| To: vim_dev@googlegroups.com |
| Subject: Patch 7.3.745 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| |
| Patch 7.3.745 |
| Problem: Automatically setting 'ttymouse' doesn't work. |
| Solution: Reset the "option was set" flag when using the default. |
| Files: src/option.c, src/proto/option.pro, src/term.c |
| |
| |
| |
| |
| |
| *** 11179,11184 **** |
| --- 11179,11197 ---- |
| } |
| |
| /* |
| + * Reset the flag indicating option "name" was set. |
| + */ |
| + void |
| + reset_option_was_set(name) |
| + char_u *name; |
| + { |
| + int idx = findoption(name); |
| + |
| + if (idx >= 0) |
| + options[idx].flags &= ~P_WAS_SET; |
| + } |
| + |
| + /* |
| * compatible_set() - Called when 'compatible' has been set or unset. |
| * |
| * When 'compatible' set: Set all relevant options (those that have the P_VIM) |
| |
| |
| |
| *** 52,57 **** |
| --- 52,58 ---- |
| void vimrc_found __ARGS((char_u *fname, char_u *envname)); |
| void change_compatible __ARGS((int on)); |
| int option_was_set __ARGS((char_u *name)); |
| + void reset_option_was_set __ARGS((char_u *name)); |
| int can_bs __ARGS((int what)); |
| void save_file_ff __ARGS((buf_T *buf)); |
| int file_ff_differs __ARGS((buf_T *buf, int ignore_empty)); |
| |
| |
| |
| *** 1864,1870 **** |
| --- 1864,1875 ---- |
| } |
| # endif |
| if (p != NULL) |
| + { |
| set_option_value((char_u *)"ttym", 0L, p, 0); |
| + /* Reset the WAS_SET flag, 'ttymouse' can be set to "sgr" or |
| + * "xterm2" in check_termcode(). */ |
| + reset_option_was_set((char_u *)"ttym"); |
| + } |
| if (p == NULL |
| # ifdef FEAT_GUI |
| || gui.in_use |
| |
| |
| |
| *** 727,728 **** |
| --- 727,730 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 745, |
| /**/ |
| |
| -- |
| hundred-and-one symptoms of being an internet addict: |
| 97. Your mother tells you to remember something, and you look for |
| a File/Save command. |
| |
| /// 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 /// |