patch 9.0.1690: popup_create() not aborting on errors
Problem: popup_create() not aborting on errors
Solution: check for errors in arguments given and abort if an error
occurred
closes: #12711
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim
index 7e1a0fc..c0842f4 100644
--- a/src/testdir/test_popupwin.vim
+++ b/src/testdir/test_popupwin.vim
@@ -4179,5 +4179,22 @@
call StopVimInTerminal(buf)
endfunc
+func Test_popupwin_with_error()
+ CheckScreendump
+
+ let lines =<< trim END
+ let options = {'border': 'ERROR', 'line': 1, 'col': 1, 'minwidth': &columns, 'title': 'TITLE'}
+
+ END
+ "call popup_create('Hello world!', options)
+ call writefile(lines, 'XtestPopupError', 'D')
+ let buf = RunVimInTerminal('-S XtestPopupError', {})
+ call term_sendkeys(buf, ":call popup_create('Hello world!', options)\<CR>")
+ call VerifyScreenDump(buf, 'Test_popupwin_with_error_1', {})
+
+ " clean up
+ call StopVimInTerminal(buf)
+endfunc
+
" vim: shiftwidth=2 sts=2