diff options
-rw-r--r-- | runtime/autoload/provider/clipboard.vim | 12 | ||||
-rw-r--r-- | src/nvim/edit.c | 8 | ||||
-rw-r--r-- | src/nvim/eval.c | 2 | ||||
-rw-r--r-- | src/nvim/screen.c | 2 | ||||
-rw-r--r-- | src/nvim/version.c | 2 | ||||
-rw-r--r-- | test/functional/ui/highlight_spec.lua | 9 |
6 files changed, 14 insertions, 21 deletions
diff --git a/runtime/autoload/provider/clipboard.vim b/runtime/autoload/provider/clipboard.vim index 3728eb9367..5ea9df92fe 100644 --- a/runtime/autoload/provider/clipboard.vim +++ b/runtime/autoload/provider/clipboard.vim @@ -37,16 +37,16 @@ if executable('pbcopy') let s:copy['*'] = s:copy['+'] let s:paste['*'] = s:paste['+'] let s:cache_enabled = 0 -elseif executable('xclip') - let s:copy['+'] = 'xclip -quiet -i -selection clipboard' - let s:paste['+'] = 'xclip -o -selection clipboard' - let s:copy['*'] = 'xclip -quiet -i -selection primary' - let s:paste['*'] = 'xclip -o -selection primary' -elseif executable('xsel') +elseif exists('$DISPLAY') && executable('xsel') let s:copy['+'] = 'xsel --nodetach -i -b' let s:paste['+'] = 'xsel -o -b' let s:copy['*'] = 'xsel --nodetach -i -p' let s:paste['*'] = 'xsel -o -p' +elseif exists('$DISPLAY') && executable('xclip') + let s:copy['+'] = 'xclip -quiet -i -selection clipboard' + let s:paste['+'] = 'xclip -o -selection clipboard' + let s:copy['*'] = 'xclip -quiet -i -selection primary' + let s:paste['*'] = 'xclip -o -selection primary' else echom 'clipboard: No clipboard tool available. See :help nvim-clipboard' finish diff --git a/src/nvim/edit.c b/src/nvim/edit.c index dbbcf4f1b9..213df4f65a 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -2548,8 +2548,12 @@ void ins_compl_show_pum(void) } } - /* Compute the screen column of the start of the completed text. - * Use the cursor to get all wrapping and other settings right. */ + // In Replace mode when a $ is displayed at the end of the line only + // part of the screen would be updated. We do need to redraw here. + dollar_vcol = -1; + + // Compute the screen column of the start of the completed text. + // Use the cursor to get all wrapping and other settings right. col = curwin->w_cursor.col; curwin->w_cursor.col = compl_col; pum_display(compl_match_array, compl_match_arraysize, cur); diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 6c471ab770..a9af7d94c1 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -10988,8 +10988,6 @@ static void f_has(typval_T *argvars, typval_T *rettv) #endif } else if (STRICMP(name, "syntax_items") == 0) { n = syntax_present(curwin); - } else if (STRICMP(name, "gui_running") == 0) { - n = ui_rgb_attached(); } } diff --git a/src/nvim/screen.c b/src/nvim/screen.c index be8307e8b3..e036c49be4 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -6222,8 +6222,8 @@ void clear_tab_page_click_defs(StlClickDefinition *const tpcd, xfree(tpcd[i].func); } } + memset(tpcd, 0, (size_t) tpcd_size * sizeof(tpcd[0])); } - memset(tpcd, 0, (size_t) tpcd_size * sizeof(tpcd[0])); } void screenclear(void) diff --git a/src/nvim/version.c b/src/nvim/version.c index d169592d0e..70600bf57b 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -600,7 +600,7 @@ static int included_patches[] = { // 691 NA 690, // 689, - // 688, + 688, // 687 NA 686, 685, diff --git a/test/functional/ui/highlight_spec.lua b/test/functional/ui/highlight_spec.lua index f9b112e464..6a89b0983d 100644 --- a/test/functional/ui/highlight_spec.lua +++ b/test/functional/ui/highlight_spec.lua @@ -14,15 +14,6 @@ describe('color scheme compatibility', function() request('vim_set_option', 't_Co', '88') eq('88', request('vim_eval', '&t_Co')) end) - - it('emulates gui_running when a rgb UI is attached', function() - eq(0, request('vim_eval', 'has("gui_running")')) - local screen = Screen.new() - screen:attach() - eq(1, request('vim_eval', 'has("gui_running")')) - screen:detach() - eq(0, request('vim_eval', 'has("gui_running")')) - end) end) |