To: vim_dev@googlegroups.com Subject: Patch 8.1.1866 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.1866 Problem: Modeless selection in GUI does not work properly. Solution: Avoid going beyond the end of the line. (closes #4783) Files: src/ui.c *** ../vim-8.1.1865/src/ui.c 2019-08-15 23:05:46.042376801 +0200 --- src/ui.c 2019-08-16 23:04:23.084110839 +0200 *************** *** 1619,1630 **** if (row == row2) end_col = col2; - else #ifdef FEAT_TEXT_PROP end_col = clip_star.max_col + 1; - #else - end_col = Columns; #endif line_end_col = clip_get_line_end(&clip_star, row); --- 1619,1630 ---- if (row == row2) end_col = col2; #ifdef FEAT_TEXT_PROP + else if (clip_star.max_col < Columns) end_col = clip_star.max_col + 1; #endif + else + end_col = Columns; line_end_col = clip_get_line_end(&clip_star, row); *************** *** 1797,1803 **** return 0; for (i = #ifdef FEAT_TEXT_PROP ! cbd->max_col + 1; #else screen_Columns; #endif --- 1797,1803 ---- return 0; for (i = #ifdef FEAT_TEXT_PROP ! cbd->max_col >= screen_Columns ? screen_Columns : cbd->max_col + 1; #else screen_Columns; #endif *** ../vim-8.1.1865/src/version.c 2019-08-16 22:42:09.997965987 +0200 --- src/version.c 2019-08-16 23:05:09.767824865 +0200 *************** *** 771,772 **** --- 771,774 ---- { /* Add new patch number below this line */ + /**/ + 1866, /**/ -- hundred-and-one symptoms of being an internet addict: 73. You give your dog used motherboards instead of bones /// Bram Moolenaar -- Bram@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 ///