summaryrefslogtreecommitdiff
path: root/src/mbyte.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2008-06-24 21:16:56 +0000
committerBram Moolenaar <Bram@vim.org>2008-06-24 21:16:56 +0000
commit3577c6fafb77da5419cd1001dac56f204d480bdc (patch)
tree46a08e8d03068c31624359c2601b3645c2881d8c /src/mbyte.c
parenta7241f5f19fd0865ce697939c347a8c88fb507d5 (diff)
downloadvim-git-3577c6fafb77da5419cd1001dac56f204d480bdc.tar.gz
updated for version 7.2a
Diffstat (limited to 'src/mbyte.c')
-rw-r--r--src/mbyte.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/mbyte.c b/src/mbyte.c
index 6ab73f2b6..4e9059366 100644
--- a/src/mbyte.c
+++ b/src/mbyte.c
@@ -2940,7 +2940,7 @@ mb_fix_col(col, row)
&& dbcs_screen_head_off(ScreenLines + LineOffset[row],
ScreenLines + LineOffset[row] + col))
|| (enc_utf8 && ScreenLines[LineOffset[row] + col] == 0)))
- --col;
+ return col - 1;
return col;
}
# endif
@@ -3008,31 +3008,31 @@ enc_canonize(enc)
/* Change "microsoft-cp" to "cp". Used in some spell files. */
if (STRNCMP(p, "microsoft-cp", 12) == 0)
- mch_memmove(p, p + 10, STRLEN(p + 10) + 1);
+ STRMOVE(p, p + 10);
/* "iso8859" -> "iso-8859" */
if (STRNCMP(p, "iso8859", 7) == 0)
{
- mch_memmove(p + 4, p + 3, STRLEN(p + 2));
+ STRMOVE(p + 4, p + 3);
p[3] = '-';
}
/* "iso-8859n" -> "iso-8859-n" */
if (STRNCMP(p, "iso-8859", 8) == 0 && p[8] != '-')
{
- mch_memmove(p + 9, p + 8, STRLEN(p + 7));
+ STRMOVE(p + 9, p + 8);
p[8] = '-';
}
/* "latin-N" -> "latinN" */
if (STRNCMP(p, "latin-", 6) == 0)
- mch_memmove(p + 5, p + 6, STRLEN(p + 5));
+ STRMOVE(p + 5, p + 6);
if (enc_canon_search(p) >= 0)
{
/* canonical name can be used unmodified */
if (p != r)
- mch_memmove(r, p, STRLEN(p) + 1);
+ STRMOVE(r, p);
}
else if ((i = enc_alias_search(p)) >= 0)
{
@@ -3692,7 +3692,11 @@ im_preedit_end_cb(GtkIMContext *context, gpointer data)
preedit_start_col = MAXCOL;
xim_has_preediting = FALSE;
+#if 0
+ /* Removal of this line suggested by Takuhiro Nishioka. Fixes that IM was
+ * switched off unintentionally. */
im_is_active = FALSE;
+#endif
gui_update_cursor(TRUE, FALSE);
im_show_info();
}
@@ -4144,6 +4148,7 @@ xim_queue_key_press_event(GdkEventKey *event, int down)
* committed while we're processing one of these keys, we can ignore
* that commit and go ahead & process it ourselves. That way we can
* still distinguish keypad keys for use in mappings.
+ * Also add GDK_space to make <S-Space> work.
*/
switch (event->keyval)
{
@@ -4163,6 +4168,7 @@ xim_queue_key_press_event(GdkEventKey *event, int down)
case GDK_KP_7: xim_expected_char = '7'; break;
case GDK_KP_8: xim_expected_char = '8'; break;
case GDK_KP_9: xim_expected_char = '9'; break;
+ case GDK_space: xim_expected_char = ' '; break;
default: xim_expected_char = NUL;
}
xim_ignored_char = FALSE;