diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-08-16 23:09:11 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-08-16 23:09:11 +0200 |
commit | d5cf89872e6185c4d97cd254a9d697b8c3bdbf94 (patch) | |
tree | 9ea1780d07ba10c341dc446fd7127635ed40f94b /src/ui.c | |
parent | a3891681f72fd9efdea6444620d787358850d823 (diff) | |
download | vim-git-d5cf89872e6185c4d97cd254a9d697b8c3bdbf94.tar.gz |
patch 8.1.1866: modeless selection in GUI does not work properlyv8.1.1866
Problem: Modeless selection in GUI does not work properly.
Solution: Avoid going beyond the end of the line. (closes #4783)
Diffstat (limited to 'src/ui.c')
-rw-r--r-- | src/ui.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1619,12 +1619,12 @@ clip_copy_modeless_selection(int both UNUSED) if (row == row2) end_col = col2; - else #ifdef FEAT_TEXT_PROP + else if (clip_star.max_col < Columns) end_col = clip_star.max_col + 1; -#else - end_col = Columns; #endif + else + end_col = Columns; line_end_col = clip_get_line_end(&clip_star, row); @@ -1797,7 +1797,7 @@ clip_get_line_end(Clipboard_T *cbd UNUSED, int row) return 0; for (i = #ifdef FEAT_TEXT_PROP - cbd->max_col + 1; + cbd->max_col >= screen_Columns ? screen_Columns : cbd->max_col + 1; #else screen_Columns; #endif |