Patch 7.4.1753
Problem: "noinsert" in 'completeopt' is sometimes ignored.
Solution: Set the variables when the 'completeopt' was set. (Ozaki Kiichi)
Files: src/edit.c, src/option.c, src/proto/edit.pro
*** ../vim-7.4.1752/src/edit.c 2016-04-14 16:22:01.161150961 +0200
--- src/edit.c 2016-04-20 11:57:43.599130214 +0200
***************
*** 2761,2766 ****
--- 2761,2781 ----
}
/*
+ * Set variables that store noselect and noinsert behavior from the
+ * 'completeopt' value.
+ */
+ void
+ completeopt_was_set()
+ {
+ compl_no_insert = FALSE;
+ compl_no_select = FALSE;
+ if (strstr((char *)p_cot, "noselect") != NULL)
+ compl_no_select = TRUE;
+ if (strstr((char *)p_cot, "noinsert") != NULL)
+ compl_no_insert = TRUE;
+ }
+
+ /*
* Start completion for the complete() function.
* "startcol" is where the matched text starts (1 is first column).
* "list" is the list of matches.
***************
*** 3675,3687 ****
}
- compl_no_insert = FALSE;
- compl_no_select = FALSE;
- if (strstr((char *)p_cot, "noselect") != NULL)
- compl_no_select = TRUE;
- if (strstr((char *)p_cot, "noinsert") != NULL)
- compl_no_insert = TRUE;
-
if (ctrl_x_mode == CTRL_X_NOT_DEFINED_YET)
{
/*
--- 3690,3695 ----
*** ../vim-7.4.1752/src/option.c 2016-03-20 17:53:20.409528052 +0100
--- src/option.c 2016-04-20 11:56:23.503959388 +0200
***************
*** 6951,6956 ****
--- 6951,6958 ----
{
if (check_opt_strings(p_cot, p_cot_values, TRUE) != OK)
errmsg = e_invarg;
+ else
+ completeopt_was_set();
}
#endif /* FEAT_INS_EXPAND */
*** ../vim-7.4.1752/src/proto/edit.pro 2016-01-19 13:21:55.833334420 +0100
--- src/proto/edit.pro 2016-04-20 11:56:43.931747901 +0200
***************
*** 8,13 ****
--- 8,14 ----
void backspace_until_column(int col);
int vim_is_ctrl_x_key(int c);
int ins_compl_add_infercase(char_u *str, int len, int icase, char_u *fname,
int dir, int flags);
+ void completeopt_was_set(void);
void set_completion(colnr_T startcol, list_T *list);
void ins_compl_show_pum(void);
char_u *find_word_start(char_u *ptr);
*** ../vim-7.4.1752/src/version.c 2016-04-18 20:03:54.103519308 +0200
--- src/version.c 2016-04-20 11:45:06.878969567 +0200
***************
*** 750,751 ****
--- 750,753 ----
{ /* Add new patch number below this line */
+ /**/
+ 1753,
/**/
--
GUARD #1: Where'd you get the coconut?
ARTHUR: We found them.
GUARD #1: Found them? In Mercea? The coconut's tropical!
ARTHUR: What do you mean?
GUARD #1: Well, this is a temperate zone.
The Quest for the Holy Grail (Monty Python)
/// Bram Moolenaar -- [email protected] -- 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 ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.