summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ex_docmd.c10
-rw-r--r--src/globals.h3
-rw-r--r--src/macros.h3
-rw-r--r--src/vim.h1
4 files changed, 12 insertions, 5 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 0bcd69e6e..48edb2e74 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -8084,6 +8084,13 @@ ex_normal(eap)
ex_startinsert(eap)
exarg_T *eap;
{
+ if (eap->forceit)
+ {
+ coladvance((colnr_T)MAXCOL);
+ curwin->w_curswant = MAXCOL;
+ curwin->w_set_curswant = FALSE;
+ }
+
/* Ignore the command when already in Insert mode. Inserting an
* expression register that invokes a function can do this. */
if (State & INSERT)
@@ -8091,9 +8098,6 @@ ex_startinsert(eap)
if (eap->forceit)
{
- coladvance((colnr_T)MAXCOL);
- curwin->w_curswant = MAXCOL;
- curwin->w_set_curswant = FALSE;
if (eap->cmdidx == CMD_startinsert)
restart_edit = 'a';
else
diff --git a/src/globals.h b/src/globals.h
index a95a32a02..cf4bc58a3 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -1239,7 +1239,6 @@ EXTERN char_u e_endwhile[] INIT(=N_("E170: Missing :endwhile"));
EXTERN char_u e_endfor[] INIT(=N_("E170: Missing :endfor"));
EXTERN char_u e_while[] INIT(=N_("E588: :endwhile without :while"));
EXTERN char_u e_for[] INIT(=N_("E588: :endfor without :for"));
-EXTERN char_u e_listreq[] INIT(=N_("E999: List required"));
#endif
EXTERN char_u e_exists[] INIT(=N_("E13: File exists (add ! to override)"));
EXTERN char_u e_failed[] INIT(=N_("E472: Command failed"));
@@ -1345,7 +1344,7 @@ EXTERN char_u e_re_damg[] INIT(=N_("E43: Damaged match string"));
EXTERN char_u e_re_corr[] INIT(=N_("E44: Corrupted regexp program"));
EXTERN char_u e_readonly[] INIT(=N_("E45: 'readonly' option is set (add ! to override)"));
#ifdef FEAT_EVAL
-EXTERN char_u e_readonlyvar[] INIT(=N_("E46: Cannot set read-only variable \"%s\""));
+EXTERN char_u e_readonlyvar[] INIT(=N_("E46: Cannot change read-only variable \"%s\""));
EXTERN char_u e_readonlysbx[] INIT(=N_("E46: Cannot set variable in the sandbox: \"%s\""));
#endif
#ifdef FEAT_QUICKFIX
diff --git a/src/macros.h b/src/macros.h
index 9596796df..6d6484c56 100644
--- a/src/macros.h
+++ b/src/macros.h
@@ -263,11 +263,14 @@
* multi-byte characters if needed.
* mb_ptr_back(): backup a pointer to the previous character, taking care of
* multi-byte characters if needed.
+ * MB_COPY_CHAR(f, t): copy one char from "f" to "t" and advance the pointers.
*/
#ifdef FEAT_MBYTE
# define mb_ptr_adv(p) p += has_mbyte ? (*mb_ptr2len_check)(p) : 1
# define mb_ptr_back(s, p) p -= has_mbyte ? ((*mb_head_off)(s, p - 1) + 1) : 1
+# define MB_COPY_CHAR(f, t) if (has_mbyte) mb_copy_char(&f, &t); else *t++ = *f++
#else
# define mb_ptr_adv(p) ++p
# define mb_ptr_back(s, p) --p
+# define MB_COPY_CHAR(f, t) *t++ = *f++
#endif
diff --git a/src/vim.h b/src/vim.h
index 8779b4d1c..88ca9a1ba 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -588,6 +588,7 @@ extern char *(*dyn_libintl_textdomain)(const char *domainname);
# define OK 1
#endif
#define FAIL 0
+#define NOTDONE 2 /* not OK or FAIL but skipped */
/* flags for b_flags */
#define BF_RECOVERED 0x01 /* buffer has been recovered */