summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-09-06 19:25:11 +0000
committerBram Moolenaar <Bram@vim.org>2005-09-06 19:25:11 +0000
commitcafda4f89323b8e76818f03d81b1d0b1887862aa (patch)
treeee5f5d0f72b8563d197736948517604c677b7052 /src
parent4440382f3c971684571e9c7494130cdd68567fd5 (diff)
updated for version 7.0142v7.0142
Diffstat (limited to 'src')
-rw-r--r--src/eval.c16
-rw-r--r--src/ex_getln.c11
-rw-r--r--src/regexp.c4
-rw-r--r--src/screen.c9
-rw-r--r--src/search.c11
-rw-r--r--src/version.h4
6 files changed, 43 insertions, 12 deletions
diff --git a/src/eval.c b/src/eval.c
index 6547b46e7f..448bd7f306 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -17583,6 +17583,7 @@ list_func_head(fp, indent)
MSG_PUTS("...");
}
msg_putchar(')');
+ msg_clr_eos();
#ifdef FEAT_EVAL
if (p_verbose > 0)
last_set_msg(fp->uf_script_ID);
@@ -18934,12 +18935,19 @@ store_session_globals(fd)
last_set_msg(scriptID)
scid_T scriptID;
{
+ char_u *p;
+
if (scriptID != 0)
{
- verbose_enter();
- MSG_PUTS(_("\n\tLast set from "));
- MSG_PUTS(get_scriptname(scriptID));
- verbose_leave();
+ p = home_replace_save(NULL, get_scriptname(scriptID));
+ if (p != NULL)
+ {
+ verbose_enter();
+ MSG_PUTS(_("\n\tLast set from "));
+ MSG_PUTS(p);
+ vim_free(p);
+ verbose_leave();
+ }
}
}
diff --git a/src/ex_getln.c b/src/ex_getln.c
index c6190bed6b..544e76be20 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -2369,17 +2369,24 @@ draw_cmdline(start, len)
* Do arabic shaping into a temporary buffer. This is very
* inefficient!
*/
- if (len * 2 > buflen)
+ if (len * 2 + 2 > buflen)
{
/* Re-allocate the buffer. We keep it around to avoid a lot of
* alloc()/free() calls. */
vim_free(arshape_buf);
- buflen = len * 2;
+ buflen = len * 2 + 2;
arshape_buf = alloc(buflen);
if (arshape_buf == NULL)
return; /* out of memory */
}
+ if (utf_iscomposing(utf_ptr2char(ccline.cmdbuff + start)))
+ {
+ /* Prepend a space to draw the leading composing char on. */
+ arshape_buf[0] = ' ';
+ newlen = 1;
+ }
+
for (j = start; j < start + len; j += mb_l)
{
p = ccline.cmdbuff + j;
diff --git a/src/regexp.c b/src/regexp.c
index e212cc0dc7..d72a7efe90 100644
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -6243,7 +6243,6 @@ cstrncmp(s1, s2, n)
{
char_u *str1, *str2;
int c1, c2, c11, c12;
- int ix;
int junk;
/* we have to handle the strcmp ourselves, since it is necessary to
@@ -6251,11 +6250,10 @@ cstrncmp(s1, s2, n)
str1 = s1;
str2 = s2;
c1 = c2 = 0;
- for (ix = 0; ix < *n; )
+ while ((int)(str1 - s1) < *n)
{
c1 = mb_ptr2char_adv(&str1);
c2 = mb_ptr2char_adv(&str2);
- ix += utf_char2len(c1);
/* decompose the character if necessary, into 'base' characters
* because I don't care about Arabic, I will hard-code the Hebrew
diff --git a/src/screen.c b/src/screen.c
index 11d89b66e8..269c7802ae 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -3480,6 +3480,15 @@ win_line(wp, lnum, startrow, endrow)
if (mb_c < 0x80)
c = mb_c;
mb_utf8 = TRUE;
+
+ /* At start of the line we can have a composing char.
+ * Draw it as a space with a composing char. */
+ if (utf_iscomposing(mb_c))
+ {
+ u8c_c2 = u8c_c1;
+ u8c_c1 = mb_c;
+ mb_c = ' ';
+ }
}
if ((mb_l == 1 && c >= 0x80)
diff --git a/src/search.c b/src/search.c
index 3013d1387c..37b3873541 100644
--- a/src/search.c
+++ b/src/search.c
@@ -1105,7 +1105,16 @@ do_search(oap, dirc, pat, count, options)
if (msgbuf != NULL)
{
msgbuf[0] = dirc;
- STRCPY(msgbuf + 1, p);
+#ifdef FEAT_MBYTE
+ if (enc_utf8 && utf_iscomposing(utf_ptr2char(p)))
+ {
+ /* Use a space to draw the composing char on. */
+ msgbuf[1] = ' ';
+ STRCPY(msgbuf + 2, p);
+ }
+ else
+#endif
+ STRCPY(msgbuf + 1, p);
if (spats[0].off.line || spats[0].off.end || spats[0].off.off)
{
p = msgbuf + STRLEN(msgbuf);
diff --git a/src/version.h b/src/version.h
index 208f7a5694..5fd353d449 100644
--- a/src/version.h
+++ b/src/version.h
@@ -36,5 +36,5 @@
#define VIM_VERSION_NODOT "vim70aa"
#define VIM_VERSION_SHORT "7.0aa"
#define VIM_VERSION_MEDIUM "7.0aa ALPHA"
-#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Sep 5)"
-#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Sep 5, compiled "
+#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Sep 6)"
+#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Sep 6, compiled "