Vimgrep may add results to a wrong quickfix list
Hi, When developing tests for autocmds changing the quickfix/location lists when vimgrep is running, I noticed that in some cases vimgrep may add results to a wrong quickfix list. The attached patch fixes this problem by using the quickfix list identifier and adds a test. - Yegappan -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. qfrefactor.diff Description: Binary data
Re: Test_terminal_response_to_control_sequence still failing for me
> I've been watching and no-one else seems to be reporting a > problem with this test -- it's been failing for me > consistently for several weeks > > function RunTheTest[38]..Test_terminal_response_to_control_sequence line > 17: Pattern '\\<\\d\\+R' does not match 'sh-4.3$ R' > > question: does this test make assumptions about the value > of $PS1? I haven't been able to reproduce it, but we do see that only "1R" shows up while it should be something "3;1R". So the shell eats some characters. Let's run "cat" and send the escape sequence with term_sendkeys(), then it should be echo'd properly. -- Time is money. Especially if you make clocks. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Patch 8.0.1645
Patch 8.0.1645 Problem:Test for terminal response to escape sequence fails for some people. (toothpik) Solution: Run "cat" and let it echo the characters. Files: src/testdir/test_terminal.vim *** ../vim-8.0.1644/src/testdir/test_terminal.vim 2018-03-25 20:31:28.964620010 +0200 --- src/testdir/test_terminal.vim 2018-03-25 21:23:05.162044769 +0200 *** *** 833,857 endif let buf = Run_shell_in_terminal({}) ! call WaitFor({-> term_getline(buf, 1) != ""}) ! call writefile(["\x1b[6n"], 'Xescape') ! call term_sendkeys(buf, "cat Xescape\") ! " wait for the response of control sequence from libvterm (and send it to tty) ! sleep 200m ! call term_wait(buf) " Wait for output from tty to display, below an empty line. ! " It should show \e3;1R, but only 1R may show up ! call assert_match('\<\d\+R', term_getline(buf, 3)) ! call term_sendkeys(buf, "\") ! call term_wait(buf) ! call Stop_shell_in_terminal(buf) exe buf . 'bwipe' - call delete('Xescape') unlet g:job endfunc --- 833,854 endif let buf = Run_shell_in_terminal({}) ! call WaitFor({-> term_getline(buf, 1) != ''}) ! call term_sendkeys(buf, "cat\") ! call WaitFor({-> term_getline(buf, 1) =~ 'cat'}) ! " Request the cursor position. ! call term_sendkeys(buf, "\x1b[6n\") " Wait for output from tty to display, below an empty line. ! call WaitFor({-> term_getline(buf, 4) =~ '3;1R'}) ! " End "cat" gently. ! call term_sendkeys(buf, "\\") + call Stop_shell_in_terminal(buf) exe buf . 'bwipe' unlet g:job endfunc *** ../vim-8.0.1644/src/version.c 2018-03-25 20:31:28.964620010 +0200 --- src/version.c 2018-03-25 21:23:25.837921536 +0200 *** *** 768,769 --- 768,771 { /* Add new patch number below this line */ + /**/ + 1645, /**/ -- hundred-and-one symptoms of being an internet addict: 60. As your car crashes through the guardrail on a mountain road, your first instinct is to search for the "back" button. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Patch 8.0.1644
Patch 8.0.1644 Problem:Terminal API tests still fail. Solution: Explicitly set 'title' in the terminal job. (Ozaki Kiichi, closes #2750) Files: src/testdir/test_terminal.vim, src/testdir/screendump.vim *** ../vim-8.0.1643/src/testdir/test_terminal.vim 2018-03-25 19:09:52.072089328 +0200 --- src/testdir/test_terminal.vim 2018-03-25 20:27:03.666201600 +0200 *** *** 1029,1038 return endif call assert_equal(1, winnr('$')) - set title " Use the title termcap entries to output the escape sequence. call writefile([ \ 'exe "set t_ts=\]51; t_fs=\x07"', \ 'let = ''["drop","Xtextfile"]''', \ 'redraw', --- 1029,1038 return endif call assert_equal(1, winnr('$')) " Use the title termcap entries to output the escape sequence. call writefile([ + \ 'set title', \ 'exe "set t_ts=\]51; t_fs=\x07"', \ 'let = ''["drop","Xtextfile"]''', \ 'redraw', *** *** 1046,1052 call StopVimInTerminal(buf) call delete('Xscript') bwipe Xtextfile - set title& endfunc func Test_terminal_api_drop_oldwin() --- 1046,1051 *** *** 1058,1067 let textfile_winid = win_getid() call assert_equal(2, winnr('$')) call win_gotoid(firstwinid) - set title " Use the title termcap entries to output the escape sequence. call writefile([ \ 'exe "set t_ts=\]51; t_fs=\x07"', \ 'let = ''["drop","Xtextfile"]''', \ 'redraw', --- 1057,1066 let textfile_winid = win_getid() call assert_equal(2, winnr('$')) call win_gotoid(firstwinid) " Use the title termcap entries to output the escape sequence. call writefile([ + \ 'set title', \ 'exe "set t_ts=\]51; t_fs=\x07"', \ 'let = ''["drop","Xtextfile"]''', \ 'redraw', *** *** 1074,1080 call StopVimInTerminal(buf) call delete('Xscript') bwipe Xtextfile - set title& endfunc func TryThis(bufnum, arg) --- 1073,1078 *** *** 1086,1095 if !CanRunVimInTerminal() return endif - set title " Use the title termcap entries to output the escape sequence. call writefile([ \ 'exe "set t_ts=\]51; t_fs=\x07"', \ 'let = ''["call","TryThis",["hello",123]]''', \ 'redraw', --- 1084,1093 if !CanRunVimInTerminal() return endif " Use the title termcap entries to output the escape sequence. call writefile([ + \ 'set title', \ 'exe "set t_ts=\]51; t_fs=\x07"', \ 'let = ''["call","TryThis",["hello",123]]''', \ 'redraw', *** *** 1104,1108 call delete('Xscript') unlet g:called_bufnum unlet g:called_arg - set title& endfunc --- 1102,1105 *** ../vim-8.0.1643/src/testdir/screendump.vim 2018-03-25 18:56:20.236729661 +0200 --- src/testdir/screendump.vim 2018-03-25 20:28:06.569839236 +0200 *** *** 24,30 " By default uses a size of 20 lines and 75 columns. " Returns the buffer number of the terminal. " ! " Options is a dictionary (not used yet). func RunVimInTerminal(arguments, options) " If Vim doesn't exit a swap file remains, causing other tests to fail. " Remove it here. --- 24,32 " By default uses a size of 20 lines and 75 columns. " Returns the buffer number of the terminal. " ! " Options is a dictionary, these items are recognized: ! " "rows" - height of the terminal window (max. 20) ! " "cols" - width of the terminal window (max. 78) func RunVimInTerminal(arguments, options) " If Vim doesn't exit a swap file remains, causing other tests to fail. " Remove it here. *** *** 47,63 set t_Co=256 background=light hi Normal ctermfg=NONE ctermbg=NONE ! " Make the window 20 lines high, unless told otherwise. ! let rows = 20 ! if has_key(a:options, 'rows') ! let rows = a:options['rows'] ! endif let cmd = GetVimCommandClean() " Add -v to have gvim run in the terminal (if possible) let cmd .= ' -v ' . a:arguments ! let buf = term_start(cmd, {'curwin': 1, 'term_rows': rows, 'term_cols': 75}) ! call assert_equal([rows, 75], term_getsize(buf)) return buf endfunc --- 49,63 set t_Co=256 background=light hi Normal ctermfg=NONE ctermbg=NONE ! " Make the window 20 lines high and 75 columns, unless told otherwise. ! let rows = get(a:options, 'rows', 20) ! let cols = get(a:options, 'cols', 75) let cmd = GetVimCommandClean() " Add -v to have gvim run in the terminal (if possible) let cmd .= ' -v ' . a:arguments ! let buf = term_start(cmd, {'curwin': 1, 'term_rows': rows, 'term_cols': cols}) ! call assert_equal([rows, cols], term_getsize(buf)) return buf endfunc *** ../vim-8.0.1643/src/version.c 2018-03-25 19:09:52.072089328 +0200 --- src/version.c
Test_terminal_response_to_control_sequence still failing for me
I've been watching and no-one else seems to be reporting a problem with this test -- it's been failing for me consistently for several weeks function RunTheTest[38]..Test_terminal_response_to_control_sequence line 17: Pattern '\\<\\d\\+R' does not match 'sh-4.3$ R' question: does this test make assumptions about the value of $PS1? -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Patch 8.0.1641
* Bram Moolenaar[2018-03-25 18:58 +0200]: > > Elimar - > > > test fails as follows: > > > > * Bram Moolenaar [2018-03-25 18:20 +0200]: > > > > > > > > Patch 8.0.1641 > > > Problem:Job in terminal can't communicate with Vim. > > > Solution: Add the terminal API. > > > Files: src/terminal.c, src/buffer.c, src/testdir/test_terminal.vim, > > > src/testdir/screendump.vim, runtime/doc/terminal.txt > > Found errors in Test_terminal_api_call(): > > Caught exception in Test_terminal_api_call(): WaitFor() timed out after > > 1000 msec @ function RunTheTest[38]..Test_terminal_api_call[12]..WaitFor, > > line 25 > > Found errors in Test_terminal_api_drop_newwin(): > > Caught exception in Test_terminal_api_drop_newwin(): WaitFor() timed out > > after 1000 msec @ function > > RunTheTest[38]..Test_terminal_api_drop_newwin[14]..WaitFor, line 25 > > Found errors in Test_terminal_api_drop_oldwin(): > > Caught exception in Test_terminal_api_drop_oldwin(): WaitFor() timed out > > after 1000 msec @ > > functionRunTheTest[38]..Test_terminal_api_drop_oldwin[18]..WaitFor, line 25 > > Hmm, it works for me. I wonder what causes the problem. > > On CI there is an error because of running in a small window, I can fix > that one at least. I am building in a tmux session ssh'd to my devel machine. The terminal has stty size 54 198. Elimar -- We all know Linux is great... it does infinite loops in 5 seconds. -Linus Torvalds -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Patch 8.0.1643
Patch 8.0.1643 Problem:Terminal API tests fail. Solution: Explicitly set 'title'. Files: src/testdir/test_terminal.vim *** ../vim-8.0.1642/src/testdir/test_terminal.vim 2018-03-25 18:56:20.236729661 +0200 --- src/testdir/test_terminal.vim 2018-03-25 19:08:47.012458600 +0200 *** *** 1029,1034 --- 1029,1035 return endif call assert_equal(1, winnr('$')) + set title " Use the title termcap entries to output the escape sequence. call writefile([ *** *** 1045,1050 --- 1046,1052 call StopVimInTerminal(buf) call delete('Xscript') bwipe Xtextfile + set title& endfunc func Test_terminal_api_drop_oldwin() *** *** 1056,1061 --- 1058,1064 let textfile_winid = win_getid() call assert_equal(2, winnr('$')) call win_gotoid(firstwinid) + set title " Use the title termcap entries to output the escape sequence. call writefile([ *** *** 1071,1076 --- 1074,1080 call StopVimInTerminal(buf) call delete('Xscript') bwipe Xtextfile + set title& endfunc func TryThis(bufnum, arg) *** *** 1082,1087 --- 1086,1093 if !CanRunVimInTerminal() return endif + set title + " Use the title termcap entries to output the escape sequence. call writefile([ \ 'exe "set t_ts=\]51; t_fs=\x07"', *** *** 1098,1101 --- 1104,1108 call delete('Xscript') unlet g:called_bufnum unlet g:called_arg + set title& endfunc *** ../vim-8.0.1642/src/version.c 2018-03-25 18:56:20.236729661 +0200 --- src/version.c 2018-03-25 19:09:24.804244067 +0200 *** *** 768,769 --- 768,771 { /* Add new patch number below this line */ + /**/ + 1643, /**/ -- hundred-and-one symptoms of being an internet addict: 58. You turn on your computer and turn off your wife. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Patch 8.0.1642
Patch 8.0.1642 Problem:Running Vim in terminal fails with two windows. Solution: Pass the number of rows to RunVimInTerminal(). Files: src/testdir/screendump.vim, src/testdir/test_terminal.vim *** ../vim-8.0.1641/src/testdir/screendump.vim 2018-03-25 18:19:47.221066088 +0200 --- src/testdir/screendump.vim 2018-03-25 18:53:11.269828661 +0200 *** *** 47,57 set t_Co=256 background=light hi Normal ctermfg=NONE ctermbg=NONE let cmd = GetVimCommandClean() " Add -v to have gvim run in the terminal (if possible) let cmd .= ' -v ' . a:arguments ! let buf = term_start(cmd, {'curwin': 1, 'term_rows': 20, 'term_cols': 75}) ! call assert_equal([20, 75], term_getsize(buf)) return buf endfunc --- 47,63 set t_Co=256 background=light hi Normal ctermfg=NONE ctermbg=NONE + " Make the window 20 lines high, unless told otherwise. + let rows = 20 + if has_key(a:options, 'rows') + let rows = a:options['rows'] + endif + let cmd = GetVimCommandClean() " Add -v to have gvim run in the terminal (if possible) let cmd .= ' -v ' . a:arguments ! let buf = term_start(cmd, {'curwin': 1, 'term_rows': rows, 'term_cols': 75}) ! call assert_equal([rows, 75], term_getsize(buf)) return buf endfunc *** ../vim-8.0.1641/src/testdir/test_terminal.vim 2018-03-25 18:19:47.221066088 +0200 --- src/testdir/test_terminal.vim 2018-03-25 18:50:30.942772173 +0200 *** *** 1064,1070 \ 'redraw', \ "set t_ts=", \ ], 'Xscript') ! let buf = RunVimInTerminal('-S Xscript', {}) call WaitFor({-> expand('%:t') =='Xtextfile'}) call assert_equal(textfile_winid, win_getid()) --- 1064,1070 \ 'redraw', \ "set t_ts=", \ ], 'Xscript') ! let buf = RunVimInTerminal('-S Xscript', {'rows': 10}) call WaitFor({-> expand('%:t') =='Xtextfile'}) call assert_equal(textfile_winid, win_getid()) *** ../vim-8.0.1641/src/version.c 2018-03-25 18:19:47.221066088 +0200 --- src/version.c 2018-03-25 18:52:41.258004393 +0200 *** *** 768,769 --- 768,771 { /* Add new patch number below this line */ + /**/ + 1642, /**/ -- hundred-and-one symptoms of being an internet addict: 57. You begin to wonder how on earth your service provider is allowed to call 200 hours per month "unlimited." /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Patch 8.0.1641
Patch 8.0.1641 Problem:Job in terminal can't communicate with Vim. Solution: Add the terminal API. Files: src/terminal.c, src/buffer.c, src/testdir/test_terminal.vim, src/testdir/screendump.vim, runtime/doc/terminal.txt *** ../vim-8.0.1640/src/terminal.c 2018-03-23 22:10:26.164804315 +0100 --- src/terminal.c 2018-03-25 18:18:57.005331832 +0200 *** *** 38,49 * in tl_scrollback are no longer used. * * TODO: ! * - Win32: In the GUI use a terminal emulator for :!cmd. * - Add a way to set the 16 ANSI colors, to be used for 'termguicolors' and in * the GUI. ! * - Some way for the job running in the terminal to send a :drop command back ! * to the Vim running the terminal. Should be usable by a simple shell or ! * python script. * - implement term_setsize() * - Copy text in the vterm to the Vim buffer once in a while, so that * completion works. --- 38,48 * in tl_scrollback are no longer used. * * TODO: ! * - For the "drop" command accept another argument for options. * - Add a way to set the 16 ANSI colors, to be used for 'termguicolors' and in * the GUI. ! * - Win32: Make terminal used for :!cmd in the GUI work better. Allow for ! * redirection. * - implement term_setsize() * - Copy text in the vterm to the Vim buffer once in a while, so that * completion works. *** *** 3146,3151 --- 3145,3284 } /* + * Handles a "drop" command from the job in the terminal. + * "item" is the file name, "item->li_next" may have options. + */ + static void + handle_drop_command(listitem_T *item) + { + char_u*fname = get_tv_string(>li_tv); + int bufnr; + win_T *wp; + tabpage_T *tp; + exarg_T ea; + + bufnr = buflist_add(fname, BLN_LISTED | BLN_NOOPT); + FOR_ALL_TAB_WINDOWS(tp, wp) + { + if (wp->w_buffer->b_fnum == bufnr) + { + /* buffer is in a window already, go there */ + goto_tabpage_win(tp, wp); + return; + } + } + + /* open in new window, like ":sbuffer N" */ + vim_memset(, 0, sizeof(ea)); + ea.cmd = (char_u *)"sbuffer"; + goto_buffer(, DOBUF_FIRST, FORWARD, bufnr); + } + + /* + * Handles a function call from the job running in a terminal. + * "item" is the function name, "item->li_next" has the arguments. + */ + static void + handle_call_command(term_T *term, channel_T *channel, listitem_T *item) + { + char_u*func; + typval_T argvars[2]; + typval_T rettv; + int doesrange; + + if (item->li_next == NULL) + { + ch_log(channel, "Missing function arguments for call"); + return; + } + func = get_tv_string(>li_tv); + + if (!ASCII_ISUPPER(*func)) + { + ch_log(channel, "Invalid function name: %s", func); + return; + } + + argvars[0].v_type = VAR_NUMBER; + argvars[0].vval.v_number = term->tl_buffer->b_fnum; + argvars[1] = item->li_next->li_tv; + if (call_func(func, STRLEN(func), , + 2, argvars, /* argv_func */ NULL, + /* firstline */ 1, /* lastline */ 1, + , /* evaluate */ TRUE, + /* partial */ NULL, /* selfdict */ NULL) == OK) + { + clear_tv(); + ch_log(channel, "Function %s called", func); + } + else + ch_log(channel, "Calling function %s failed", func); + } + + /* + * Called by libvterm when it cannot recognize an OSC sequence. + * We recognize a terminal API command. + */ + static int + parse_osc(const char *command, size_t cmdlen, void *user) + { + term_T*term = (term_T *)user; + js_read_T reader; + typval_T tv; + channel_T *channel = term->tl_job == NULL ? NULL + : term->tl_job->jv_channel; + + /* We recognize only OSC 5 1 ; {command} */ + if (cmdlen < 3 || STRNCMP(command, "51;", 3) != 0) + return 0; /* not handled */ + + reader.js_buf = vim_strnsave((char_u *)command + 3, cmdlen - 3); + if (reader.js_buf == NULL) + return 1; + reader.js_fill = NULL; + reader.js_used = 0; + if (json_decode(, , 0) == OK + && tv.v_type == VAR_LIST + && tv.vval.v_list != NULL) + { + listitem_T *item = tv.vval.v_list->lv_first; + + if (item == NULL) + ch_log(channel, "Missing command"); + else + { + char_u *cmd = get_tv_string(>li_tv); + + item = item->li_next; + if (item == NULL) + ch_log(channel, "Missing argument for %s", cmd); + else if (STRCMP(cmd, "drop") == 0) + handle_drop_command(item); + else if (STRCMP(cmd, "call") == 0) + handle_call_command(term, channel, item); + else + ch_log(channel, "Invalid command received: %s", cmd); + } + } + else +
Patch 8.0.1640
Patch 8.0.1640 Problem:Test_cwd() is flaky. Solution: Add to list of flaky tests. Files: src/testdir/runtest.vim *** ../vim-8.0.1639/src/testdir/runtest.vim 2018-02-12 21:31:29.678121098 +0100 --- src/testdir/runtest.vim 2018-03-25 17:12:45.115753832 +0200 *** *** 248,253 --- 248,254 \ 'Test_close_and_exit_cb()', \ 'Test_collapse_buffers()', \ 'Test_communicate()', + \ 'Test_cwd()', \ 'Test_exit_callback_interval()', \ 'Test_nb_basic()', \ 'Test_oneshot()', *** ../vim-8.0.1639/src/version.c 2018-03-25 16:20:18.521264011 +0200 --- src/version.c 2018-03-25 17:09:16.348959702 +0200 *** *** 768,769 --- 768,771 { /* Add new patch number below this line */ + /**/ + 1640, /**/ -- "I don’t know how to make a screenshot" - Richard Stallman, July 2002 (when asked to send a screenshot of his desktop for unix.se) /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Patch 8.0.1639
Patch 8.0.1639 Problem:Libvterm code lags behind master. Solution: Sync to head, solve merge problems. Files: src/libvterm/README, src/libvterm/bin/unterm.c, src/libvterm/bin/vterm-ctrl.c, src/libvterm/bin/vterm-dump.c, src/libvterm/doc/URLs, src/libvterm/doc/seqs.txt, src/libvterm/include/vterm.h, src/libvterm/include/vterm_keycodes.h, src/libvterm/src/mouse.c, src/libvterm/src/parser.c, src/libvterm/src/pen.c, src/libvterm/src/screen.c, src/libvterm/src/state.c, src/libvterm/src/vterm.c, src/libvterm/src/vterm_internal.h, src/libvterm/t/10state_putglyph.test, src/libvterm/t/25state_input.test, src/libvterm/t/harness.c, src/libvterm/t/26state_query.test *** ../vim-8.0.1638/src/libvterm/README 2017-07-23 22:07:23.041277153 +0200 --- src/libvterm/README 2018-03-25 15:51:01.967096196 +0200 *** *** 10,12 --- 10,30 - Add a .gitignore file. - Convert from C99 to C90. - Other changes to support embedding in Vim. + + + To merge in changes from Github, do this: + - Commit any pending changes. + - Setup the merge tool: + git config merge.tool vimdiff + git config merge.conflictstyle diff3 + git config mergetool.prompt false + - Run the merge tool: + git mergetool + This will open a four-way diff between: + LOCAL - your current version + BASE - version as it was at your last sync + REMOTE - version at head on Github + MERGED - best-effort merge of LOCAL and REMOTE + Now find places where automatic merge didn't work, they are marked with + , === and >>> + Fix those places in MERGED, remove the markers, and save the file :wqall. *** ../vim-8.0.1638/src/libvterm/bin/unterm.c 2017-07-25 21:34:42.065132676 +0200 --- src/libvterm/bin/unterm.c 2018-03-25 15:04:33.706954390 +0200 *** *** 95,102 sgr[sgri++] = 90 + (index - 8); else { sgr[sgri++] = 38; ! sgr[sgri++] = 5 | (1<<31); ! sgr[sgri++] = index | (1<<31); } } --- 95,102 sgr[sgri++] = 90 + (index - 8); else { sgr[sgri++] = 38; ! sgr[sgri++] = 5 | CSI_ARG_FLAG_MORE; ! sgr[sgri++] = index | CSI_ARG_FLAG_MORE; } } *** *** 112,119 sgr[sgri++] = 100 + (index - 8); else { sgr[sgri++] = 48; ! sgr[sgri++] = 5 | (1<<31); ! sgr[sgri++] = index | (1<<31); } } --- 112,119 sgr[sgri++] = 100 + (index - 8); else { sgr[sgri++] = 48; ! sgr[sgri++] = 5 | CSI_ARG_FLAG_MORE; ! sgr[sgri++] = index | CSI_ARG_FLAG_MORE; } } *** *** 125,133 int i; for(i = 0; i < sgri; i++) printf(!i ? "%d" : ! sgr[i] & (1<<31) ? ":%d" : ";%d", ! sgr[i] & ~(1<<31)); } printf("m"); } --- 125,133 int i; for(i = 0; i < sgri; i++) printf(!i ? "%d" : ! CSI_ARG_HAS_MORE(sgr[i]) ? ":%d" : ";%d", ! CSI_ARG(sgr[i])); } printf("m"); } *** *** 283,287 --- 283,288 close(fd); vterm_free(vt); + return 0; } *** ../vim-8.0.1638/src/libvterm/bin/vterm-ctrl.c 2017-07-24 22:26:39.757774872 +0200 --- src/libvterm/bin/vterm-ctrl.c 2018-03-25 15:12:40.460260840 +0200 *** *** 53,58 --- 53,59 "curblink [off|on|query]", "curshape [block|under|bar|query]", "mouse [off|click|clickdrag|motion]", + "reportfocus [off|on|query]", "altscreen [off|on|query]", "bracketpaste [off|on|query]", "icontitle [STR]", *** *** 81,89 return ret; } ! static void await_c1(int c1) { ! int c; /* await CSI - 8bit or 2byte 7bit form */ int in_esc = FALSE; --- 82,90 return ret; } ! static void await_c1(unsigned char c1) { ! unsigned char c; /* await CSI - 8bit or 2byte 7bit form */ int in_esc = FALSE; *** *** 340,345 --- 341,349 printf("\x1b[?1003h"); break; } } + else if(streq(arg, "reportfocus")) { + do_dec_mode(1004, getboolq(, argc, argv), "reportfocus"); + } else if(streq(arg, "altscreen")) { do_dec_mode(1049, getboolq(, argc, argv), "altscreen"); } *** ../vim-8.0.1638/src/libvterm/bin/vterm-dump.c 2017-07-07 11:53:29.515876528 +0200 --- src/libvterm/bin/vterm-dump.c 2018-03-25 15:13:04.920126272 +0200 *** *** 227,231 --- 227,232 close(fd); vterm_free(vt); + return 0; } ***
Re: term-dump differences
On Sa, 24 Mär 2018, Bram Moolenaar wrote: > > On Fr, 23 Mär 2018, Christian Brabandt wrote: > > > > On Fr, 23 Mär 2018, Bram Moolenaar wrote: > > > > > > > Weird. I can only explain it if the dump that has @32 had a NUL > > > > character in there. Both NUL and space end up as a space in the dump. > > > > > > > > Having a NUL halfway a line is weird. Normally it only happens at the > > > > end of the line. Can you reproduce this problem? > > > > > > > > Let me change the check for repeat to treat NUL and space the same, that > > > > should fix the problem. Don't know how to test this though. > > > > > > Thanks. I cannot reproduce it locally, but when the CI tests PR 2732 > > > usually at least one test runs into the problem. I can push a new commit > > > there to see if the test now runs successfully. > > > > Looks like it still happens: > > https://api.travis-ci.org/v3/job/357617530/log.txt > > Eh, that one says: > > Test results: > > ALL DONE > > Are you saying that is some kind of race condition? It's hard to figure > out what happens if you can't reproduce locally. Argl, I guess I did rebuild that run and it has overwritten the test result. I cannot reproduce it locally however. Sorry. Best, Christian -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.