Mercurial > vim
comparison src/edit.c @ 844:d3bbb5dd3913 v7.0f02
updated for version 7.0f02
author | vimboss |
---|---|
date | Thu, 27 Apr 2006 00:02:13 +0000 |
parents | a209672376fd |
children | db44f7b81373 |
comparison
equal
deleted
inserted
replaced
843:9f279ebda751 | 844:d3bbb5dd3913 |
---|---|
333 EMSG(_(e_secure)); | 333 EMSG(_(e_secure)); |
334 return FALSE; | 334 return FALSE; |
335 } | 335 } |
336 | 336 |
337 #ifdef FEAT_INS_EXPAND | 337 #ifdef FEAT_INS_EXPAND |
338 /* Don't allow recursive insert mode when busy with completion. */ | |
339 if (compl_started || pum_visible()) | |
340 { | |
341 EMSG(_(e_secure)); | |
342 return FALSE; | |
343 } | |
338 ins_compl_clear(); /* clear stuff for CTRL-X mode */ | 344 ins_compl_clear(); /* clear stuff for CTRL-X mode */ |
339 #endif | 345 #endif |
340 | 346 |
341 #ifdef FEAT_AUTOCMD | 347 #ifdef FEAT_AUTOCMD |
342 /* | 348 /* |
5145 { | 5151 { |
5146 /* Format with 'formatexpr' when it's set. Use internal formatting | 5152 /* Format with 'formatexpr' when it's set. Use internal formatting |
5147 * when 'formatexpr' isn't set or it returns non-zero. */ | 5153 * when 'formatexpr' isn't set or it returns non-zero. */ |
5148 #if defined(FEAT_EVAL) | 5154 #if defined(FEAT_EVAL) |
5149 if (*curbuf->b_p_fex == NUL | 5155 if (*curbuf->b_p_fex == NUL |
5150 || fex_format(curwin->w_cursor.lnum, 1L) != 0) | 5156 || fex_format(curwin->w_cursor.lnum, 1L, c) != 0) |
5151 #endif | 5157 #endif |
5152 internal_format(textwidth, second_indent, flags, c == NUL); | 5158 internal_format(textwidth, second_indent, flags, c == NUL); |
5153 } | 5159 } |
5154 | 5160 |
5155 if (c == NUL) /* only formatting was wanted */ | 5161 if (c == NUL) /* only formatting was wanted */ |
7241 ins_reg() | 7247 ins_reg() |
7242 { | 7248 { |
7243 int need_redraw = FALSE; | 7249 int need_redraw = FALSE; |
7244 int regname; | 7250 int regname; |
7245 int literally = 0; | 7251 int literally = 0; |
7252 #ifdef FEAT_VISUAL | |
7253 int vis_active = VIsual_active; | |
7254 #endif | |
7246 | 7255 |
7247 /* | 7256 /* |
7248 * If we are going to wait for a character, show a '"'. | 7257 * If we are going to wait for a character, show a '"'. |
7249 */ | 7258 */ |
7250 pc_status = PC_STATUS_UNSET; | 7259 pc_status = PC_STATUS_UNSET; |
7342 #endif | 7351 #endif |
7343 | 7352 |
7344 /* If the inserted register is empty, we need to remove the '"' */ | 7353 /* If the inserted register is empty, we need to remove the '"' */ |
7345 if (need_redraw || stuff_empty()) | 7354 if (need_redraw || stuff_empty()) |
7346 edit_unputchar(); | 7355 edit_unputchar(); |
7356 | |
7357 #ifdef FEAT_VISUAL | |
7358 /* Disallow starting Visual mode here, would get a weird mode. */ | |
7359 if (!vis_active && VIsual_active) | |
7360 end_visual_mode(); | |
7361 #endif | |
7347 } | 7362 } |
7348 | 7363 |
7349 /* | 7364 /* |
7350 * CTRL-G commands in Insert mode. | 7365 * CTRL-G commands in Insert mode. |
7351 */ | 7366 */ |
8952 * replacing the next line, so we push all of the characters left on the | 8967 * replacing the next line, so we push all of the characters left on the |
8953 * line onto the replace stack. This is not done here though, it is done | 8968 * line onto the replace stack. This is not done here though, it is done |
8954 * in open_line(). | 8969 * in open_line(). |
8955 */ | 8970 */ |
8956 | 8971 |
8972 #ifdef FEAT_VIRTUALEDIT | |
8973 /* Put cursor on NUL if on the last char and coladd is 1 (happens after | |
8974 * CTRL-O). */ | |
8975 if (virtual_active() && curwin->w_cursor.coladd > 0) | |
8976 coladvance(getviscol()); | |
8977 #endif | |
8978 | |
8957 #ifdef FEAT_RIGHTLEFT | 8979 #ifdef FEAT_RIGHTLEFT |
8958 # ifdef FEAT_FKMAP | 8980 # ifdef FEAT_FKMAP |
8959 if (p_altkeymap && p_fkmap) | 8981 if (p_altkeymap && p_fkmap) |
8960 fkmap(NL); | 8982 fkmap(NL); |
8961 # endif | 8983 # endif |