Lines Matching refs:buf

20   let buf = term_start(&shell, {})
22 call term_sendkeys(buf, cmd)
23 call WaitForAssert({-> assert_equal(1, term_getaltscreen(buf))})
26 call term_sendkeys(buf, cmd)
27 call WaitForAssert({-> assert_equal(0, term_getaltscreen(buf))})
29 call term_sendkeys(buf, "exit\r")
30 exe buf . "bwipe!"
83 let buf = RunVimInTerminal('-S XtermStart', #{rows: 15})
84 call TermWait(buf, 100)
85 call term_sendkeys(buf, ":call OpenTerm()\<CR>")
86 call TermWait(buf, 50)
87 call term_sendkeys(buf, "hello\<CR>")
88 call VerifyScreenDump(buf, 'Test_terminal_color_' .. a:group_name, {})
90 call term_sendkeys(buf, "\<C-D>")
91 call TermWait(buf, 50)
92 call StopVimInTerminal(buf)
147 let buf = RunVimInTerminal('-S XtermStart', #{rows: 15})
148 call TermWait(buf, 100)
149 call term_sendkeys(buf, ":call OpenTerm()\<CR>")
150 call TermWait(buf, 50)
151 call term_sendkeys(buf, "hello\<CR>")
152 call TermWait(buf, 50)
154 call term_sendkeys(buf, "\<C-W>:split\<CR>")
155 call term_sendkeys(buf, "\<C-W>:set wincolor=MyWinCol\<CR>")
156 call VerifyScreenDump(buf, 'Test_terminal_wincolor_split_MyWinCol', {})
158 call term_sendkeys(buf, "\<C-W>b:2sb\<CR>")
159 call term_sendkeys(buf, "\<C-W>:set wincolor=MyWinCol2\<CR>")
160 call VerifyScreenDump(buf, 'Test_terminal_wincolor_split_MyWinCol2', {})
162 call term_sendkeys(buf, "\<C-D>")
163 call TermWait(buf, 50)
164 call StopVimInTerminal(buf)
255 \ " let s:buf = term_start('" .. cmd .. " Xtext', #{hidden: 1, term_finish: 'close'})",
256 …\ ' let g:winid = popup_create(s:buf, #{minwidth: 45, minheight: 7, border: [], drag: 1, resize: …
268 \ ' call popup_create(s:buf, #{minwidth: 40, minheight: 6, border: []})',
272 let buf = RunVimInTerminal('-S XtermPopup', #{rows: 15})
273 call TermWait(buf, 100)
274 call term_sendkeys(buf, ":call OpenTerm(0)\<CR>")
275 call TermWait(buf, 500)
276 call term_sendkeys(buf, ":\<CR>")
277 call TermWait(buf, 100)
278 call term_sendkeys(buf, "\<C-W>:echo getwinvar(g:winid, \"&buftype\") win_gettype(g:winid)\<CR>")
279 call VerifyScreenDump(buf, 'Test_terminal_popup_1', {})
281 call term_sendkeys(buf, ":q\<CR>")
282 call VerifyScreenDump(buf, 'Test_terminal_popup_2', {})
284 call term_sendkeys(buf, ":call OpenTerm(1)\<CR>")
285 call TermWait(buf, 500)
286 call term_sendkeys(buf, ":set hlsearch\<CR>")
287 call TermWait(buf, 100)
288 call term_sendkeys(buf, "/edit\<CR>")
289 call VerifyScreenDump(buf, 'Test_terminal_popup_3', {})
291 call term_sendkeys(buf, "\<C-W>:call HidePopup()\<CR>")
292 call VerifyScreenDump(buf, 'Test_terminal_popup_4', {})
293 call term_sendkeys(buf, "\<CR>")
294 call TermWait(buf, 50)
296 call term_sendkeys(buf, "\<C-W>:call ClosePopup()\<CR>")
297 call VerifyScreenDump(buf, 'Test_terminal_popup_5', {})
299 call term_sendkeys(buf, "\<C-W>:call ReopenPopup()\<CR>")
300 call VerifyScreenDump(buf, 'Test_terminal_popup_6', {})
303 call term_sendkeys(buf, "\<C-W>Ngg/in\<CR>vww")
304 call VerifyScreenDump(buf, 'Test_terminal_popup_7', {})
307 call term_sendkeys(buf, "A")
308 call VerifyScreenDump(buf, 'Test_terminal_popup_8', {})
310 call TermWait(buf, 50)
311 call term_sendkeys(buf, ":q\<CR>")
312 call TermWait(buf, 250) " wait for terminal to vanish
314 call StopVimInTerminal(buf)
332 \ " let s:buf = term_start('cat Xtext', #{hidden: 1})",
333 \ ' let g:winid = popup_create(s:buf, #{ border: []})',
337 let buf = RunVimInTerminal('-S XtermPopup', #{rows: 15})
338 call TermWait(buf, 100)
339 call term_sendkeys(buf, ":set noruler\<CR>")
340 call term_sendkeys(buf, ":call OpenTerm()\<CR>")
341 call TermWait(buf, 50)
342 call term_sendkeys(buf, ":\<CR>")
343 call VerifyScreenDump(buf, 'Test_terminal_popup_m1', {})
345 call TermWait(buf, 50)
346 call term_sendkeys(buf, ":q\<CR>")
347 call TermWait(buf, 50) " wait for terminal to vanish
348 call StopVimInTerminal(buf)
361 \ " let s:buf = term_start('cat', #{hidden: 1, "
363 \ ' let g:winid = popup_create(s:buf, #{border: [], '
369 let buf = RunVimInTerminal('-S XtermPopup', #{rows: 15})
370 call TermWait(buf, 100)
371 call term_sendkeys(buf, ":set noruler\<CR>")
372 call term_sendkeys(buf, ":call OpenTerm()\<CR>")
373 call TermWait(buf, 50)
374 call term_sendkeys(buf, "hello\<CR>")
375 call VerifyScreenDump(buf, 'Test_terminal_popup_' .. a:group_name, {})
377 call term_sendkeys(buf, "\<C-D>")
378 call TermWait(buf, 50)
379 call term_sendkeys(buf, ":q\<CR>")
380 call TermWait(buf, 50) " wait for terminal to vanish
381 call StopVimInTerminal(buf)
547 let buf = term_start(&shell, #{hidden: 1})
549 call StopShellInTerminal(buf)
574 let buf = RunVimInTerminal('-S XTest_startinsert', {})
576 call term_sendkeys(buf, "exit\r")
577 call WaitForAssert({-> assert_equal("some text", term_getline(buf, 1))})
578 call term_sendkeys(buf, "0l")
579 call term_sendkeys(buf, "A<\<Esc>")
580 call WaitForAssert({-> assert_equal("some text<", term_getline(buf, 1))})
582 call StopVimInTerminal(buf)
604 let buf = term_start('echo')
605 call assert_fails('call term_setapi(' .. buf .. ', {})', 'E731:')
606 call assert_fails('call term_setkill(' .. buf .. ', {})', 'E731:')
607 call assert_fails('call term_setrestore(' .. buf .. ', {})', 'E731:')
608 exe buf . "bwipe!"
615 let buf = RunVimInTerminal('', {})
616 call term_sendkeys(buf, ":set nocompatible\<CR>")
617 call term_sendkeys(buf, ":set timeoutlen=20\<CR>")
631 call term_sendkeys(buf, "i")
633 call term_sendkeys(buf, "\<C-U>\<C-K>" .. keys[i])
634 call WaitForAssert({-> assert_equal(output[i], term_getline(buf, 1))}, 200)
648 call term_sendkeys(buf, "\<C-U>" .. keypad_keys[i])
649 call WaitForAssert({-> assert_equal(keypad_output[i], term_getline(buf, 1))}, 100)
653 call WaitForAssert({-> assert_equal('two', term_getline(buf, 1))})
655 call StopVimInTerminal(buf)
678 let buf = RunVimInTerminal('Xtest_mouse -n', {})
679 call term_sendkeys(buf, ":set nocompatible\<CR>")
680 call term_sendkeys(buf, ":set mouse=a term=xterm ttymouse=sgr\<CR>")
681 call term_sendkeys(buf, ":set clipboard=\<CR>")
682 call term_sendkeys(buf, ":set mousemodel=extend\<CR>")
683 call TermWait(buf)
696 call term_sendkeys(buf, "\<LeftMouse>\<LeftRelease>")
697 call TermWait(buf, 50)
698 call term_sendkeys(buf, ":call writefile([json_encode(getpos('.'))], 'Xbuf')\<CR>")
699 call TermWait(buf, 50)
706 call term_sendkeys(buf, "\<LeftMouse>")
708 call term_sendkeys(buf, "\<LeftRelease>y")
709 call TermWait(buf, 50)
710 call term_sendkeys(buf, ":call writefile([@\"], 'Xbuf')\<CR>")
711 call TermWait(buf, 50)
717 call term_sendkeys(buf, "\<LeftMouse>\<LeftRelease>\<LeftMouse>")
719 call term_sendkeys(buf, "\<LeftRelease>y")
720 call TermWait(buf, 50)
721 call term_sendkeys(buf, ":call writefile([@\"], 'Xbuf')\<CR>")
722 call TermWait(buf, 50)
728 …call term_sendkeys(buf, "\<LeftMouse>\<LeftRelease>\<LeftMouse>\<LeftRelease>\<LeftMouse>\<LeftRel…
729 call TermWait(buf, 50)
730 call term_sendkeys(buf, ":call writefile([@\"], 'Xbuf')\<CR>")
731 call TermWait(buf, 50)
737 …call term_sendkeys(buf, "\<LeftMouse>\<LeftRelease>\<LeftMouse>\<LeftRelease>\<LeftMouse>\<LeftRel…
739 call term_sendkeys(buf, "\<LeftRelease>y")
740 call TermWait(buf, 50)
741 call term_sendkeys(buf, ":call writefile([@\"], 'Xbuf')\<CR>")
742 call TermWait(buf, 50)
748 call term_sendkeys(buf, "\<LeftMouse>\<LeftRelease>")
750 call term_sendkeys(buf, "\<RightMouse>\<RightRelease>y")
751 call TermWait(buf, 50)
752 call term_sendkeys(buf, ":call writefile([@\"], 'Xbuf')\<CR>")
753 call TermWait(buf, 50)
758 call term_sendkeys(buf, ":let @r='bright '\<CR>")
760 call term_sendkeys(buf, "\"r\<MiddleMouse>\<MiddleRelease>")
761 call TermWait(buf, 50)
762 call term_sendkeys(buf, ":call writefile([getline(2)], 'Xbuf')\<CR>")
763 call TermWait(buf, 50)
767 call TermWait(buf)
768 call StopVimInTerminal(buf)
795 let buf = Run_shell_in_terminal({})
796 call term_sendkeys(buf, "echo -ne $'\\e\]7;file://".tmpfolder_url."\\a'\<CR>")
797 "call term_sendkeys(buf, "cd ".tmpfolder."\<CR>")
798 call TermWait(buf)
831 let buf = RunVimInTerminal('Xtest_modeless -n', {})
832 call term_sendkeys(buf, ":set nocompatible\<CR>")
833 call term_sendkeys(buf, ":set mouse=\<CR>")
834 call TermWait(buf)
841 call TermWait(buf)
854 call TermWait(buf)
855 call StopVimInTerminal(buf)
872 let buf = RunVimInTerminal('', {'cols': 60})
873 call TermWait(buf, 100)
874 call term_sendkeys(buf, ":echo getwinpos(500)\<CR>")
877 let rows = term_getsize(buf)[0]
878 call WaitForAssert({-> assert_match('\[\d\+, \d\+\]', term_getline(buf, rows))})
879 let line = term_getline(buf, rows)
897 call TermWait(buf)
898 call term_sendkeys(buf, ":q\<CR>")
899 call StopVimInTerminal(buf)