To: vim-dev@vim.org Subject: Patch 6.1.231 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1.231 Problem: Double clicking with the mouse to select a word does not work for multi-byte characters. Solution: Use vim_iswordc() instead of vim_isIDc(). This means 'iskeyword' is used intead of 'isident'. Also fix that mixing ASCII with multi-byte word characters doesn't work, the mouse class for punctuation and word characters was mixed up. Files: src/normal.c *** ../vim61.230/src/normal.c Thu Oct 17 20:09:35 2002 --- src/normal.c Thu Oct 17 20:08:43 2002 *************** *** 2706,2712 **** oap->motion_type = MCHAR; if (oap != NULL && VIsual_mode == 'v' ! && !vim_isIDc(gchar_pos(&end_visual)) && equal(curwin->w_cursor, VIsual) && (pos = findmatch(oap, NUL)) != NULL) { --- 2706,2712 ---- oap->motion_type = MCHAR; if (oap != NULL && VIsual_mode == 'v' ! && !vim_iswordc(gchar_pos(&end_visual)) && equal(curwin->w_cursor, VIsual) && (pos = findmatch(oap, NUL)) != NULL) { *************** *** 2848,2855 **** if (c == ' ' || c == '\t') return 0; ! if (vim_isIDc(c)) ! return 1; /* * There are a few special cases where we want certain combinations of --- 2848,2855 ---- if (c == ' ' || c == '\t') return 0; ! if (vim_iswordc(c)) ! return 2; /* * There are a few special cases where we want certain combinations of *************** *** 2858,2864 **** * character is in it's own class. */ if (c != NUL && vim_strchr((char_u *)"-+*/%<>&|^!=", c) != NULL) ! return 2; return c; } #endif /* FEAT_VISUAL */ --- 2858,2864 ---- * character is in it's own class. */ if (c != NUL && vim_strchr((char_u *)"-+*/%<>&|^!=", c) != NULL) ! return 1; return c; } #endif /* FEAT_VISUAL */ *** ../vim61.230/src/version.c Thu Oct 17 20:10:10 2002 --- src/version.c Thu Oct 17 19:26:33 2002 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 231, /**/ -- hundred-and-one symptoms of being an internet addict: 252. You vote for foreign officials. /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.vim.org \\\ \\\ Project leader for A-A-P -- http://www.a-a-p.org /// \\\ Lord Of The Rings helps Uganda - http://iccf-holland.org/lotr.html ///