summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-03-04 23:39:37 +0000
committerBram Moolenaar <Bram@vim.org>2005-03-04 23:39:37 +0000
commit19a09a189379659b917cf5ccff78f3e5ec061015 (patch)
tree806d594bf7af04ef956c0c96ad64adfcd96325dc /src
parent7383034c0ab657158c4c69146254beffdea4859e (diff)
updated for version 7.0055v7.0055
Diffstat (limited to 'src')
-rw-r--r--src/VisVim/Res/ToolbarL.bmpbin0 -> 2678 bytes
-rw-r--r--src/VisVim/Res/ToolbarM.bmpbin0 -> 758 bytes
-rw-r--r--src/eval.c47
-rw-r--r--src/fileio.c60
-rw-r--r--src/getchar.c4
-rw-r--r--src/gui_gtk_x11.c89
-rw-r--r--src/gui_w32.c22
-rw-r--r--src/gui_x11.c2
-rw-r--r--src/keymap.h15
-rw-r--r--src/misc2.c1
-rw-r--r--src/normal.c3
-rw-r--r--src/option.c4
-rw-r--r--src/os_mac_conv.c8
-rw-r--r--src/os_mswin.c7
-rw-r--r--src/po/ja.po3778
-rw-r--r--src/po/ja.sjis.po3778
-rw-r--r--src/proto/eval.pro1
-rw-r--r--src/proto/tag.pro1
-rw-r--r--src/regexp.c28
-rw-r--r--src/tag.c125
-rw-r--r--src/term.c198
-rw-r--r--src/testdir/test24.inbin890 -> 975 bytes
-rw-r--r--src/testdir/test24.ok3
-rw-r--r--src/undo.c4
-rw-r--r--src/version.h4
-rw-r--r--src/vim.h4
26 files changed, 4768 insertions, 3418 deletions
diff --git a/src/VisVim/Res/ToolbarL.bmp b/src/VisVim/Res/ToolbarL.bmp
new file mode 100644
index 0000000000..e11c66fc65
--- /dev/null
+++ b/src/VisVim/Res/ToolbarL.bmp
Binary files differ
diff --git a/src/VisVim/Res/ToolbarM.bmp b/src/VisVim/Res/ToolbarM.bmp
new file mode 100644
index 0000000000..22e15f4893
--- /dev/null
+++ b/src/VisVim/Res/ToolbarM.bmp
Binary files differ
diff --git a/src/eval.c b/src/eval.c
index bde12e56e1..c7aba51456 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -316,6 +316,8 @@ static struct vimvar
{VV_NAME("val", VAR_UNKNOWN), VV_RO},
{VV_NAME("key", VAR_UNKNOWN), VV_RO},
{VV_NAME("profiling", VAR_NUMBER), VV_RO},
+ {VV_NAME("fcs_reason", VAR_STRING), VV_RO},
+ {VV_NAME("fcs_choice", VAR_STRING), 0},
};
/* shorthand */
@@ -549,6 +551,7 @@ static void f_synID __ARGS((typval_T *argvars, typval_T *rettv));
static void f_synIDattr __ARGS((typval_T *argvars, typval_T *rettv));
static void f_synIDtrans __ARGS((typval_T *argvars, typval_T *rettv));
static void f_system __ARGS((typval_T *argvars, typval_T *rettv));
+static void f_taglist __ARGS((typval_T *argvars, typval_T *rettv));
static void f_tempname __ARGS((typval_T *argvars, typval_T *rettv));
static void f_tolower __ARGS((typval_T *argvars, typval_T *rettv));
static void f_toupper __ARGS((typval_T *argvars, typval_T *rettv));
@@ -6196,6 +6199,7 @@ static struct fst
{"synIDattr", 2, 3, f_synIDattr},
{"synIDtrans", 1, 1, f_synIDtrans},
{"system", 1, 2, f_system},
+ {"taglist", 1, 1, f_taglist},
{"tempname", 0, 0, f_tempname},
{"tolower", 1, 1, f_tolower},
{"toupper", 1, 1, f_toupper},
@@ -13134,6 +13138,35 @@ done:
}
/*
+ * "gettags()" function
+ */
+ static void
+f_taglist(argvars, rettv)
+ typval_T *argvars;
+ typval_T *rettv;
+{
+ char_u *tag_pattern;
+ list_T *l;
+
+ tag_pattern = get_tv_string(&argvars[0]);
+
+ rettv->vval.v_number = FALSE;
+
+ l = list_alloc();
+ if (l != NULL)
+ {
+ if (get_tags(l, tag_pattern) != FAIL)
+ {
+ rettv->vval.v_list = l;
+ rettv->v_type = VAR_LIST;
+ ++l->lv_refcount;
+ }
+ else
+ list_free(l);
+ }
+}
+
+/*
* "tempname()" function
*/
/*ARGSUSED*/
@@ -14010,7 +14043,7 @@ set_vim_var_nr(idx, val)
}
/*
- * Get number v: variable value;
+ * Get number v: variable value.
*/
long
get_vim_var_nr(idx)
@@ -14019,6 +14052,18 @@ get_vim_var_nr(idx)
return vimvars[idx].vv_nr;
}
+#if defined(FEAT_AUTOCMD) || defined(PROTO)
+/*
+ * Get string v: variable value. Uses a static buffer, can only be used once.
+ */
+ char_u *
+get_vim_var_str(idx)
+ int idx;
+{
+ return get_tv_string(&vimvars[idx].vv_tv);
+}
+#endif
+
/*
* Set v:count, v:count1 and v:prevcount.
*/
diff --git a/src/fileio.c b/src/fileio.c
index c3aef90a11..1edf0ae79a 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -1331,7 +1331,8 @@ retry:
/*
* If there is conversion error or not enough room try using
- * another conversion.
+ * another conversion. Except for when there is no
+ * alternative (help files).
*/
while ((iconv(iconv_fd, (void *)&fromp, &from_size,
&top, &to_size)
@@ -2753,7 +2754,7 @@ buf_write(buf, fname, sfname, start, end, eap, append, forceit,
if (!(did_cmd = apply_autocmds_exarg(EVENT_BUFWRITECMD,
sfname, sfname, FALSE, curbuf, eap)))
{
- if (bt_nofile(curbuf))
+ if (overwriting && bt_nofile(curbuf))
nofile_err = TRUE;
else
apply_autocmds_exarg(EVENT_BUFWRITEPRE,
@@ -2765,7 +2766,7 @@ buf_write(buf, fname, sfname, start, end, eap, append, forceit,
if (!(did_cmd = apply_autocmds_exarg(EVENT_FILEWRITECMD,
sfname, sfname, FALSE, curbuf, eap)))
{
- if (bt_nofile(curbuf))
+ if (overwriting && bt_nofile(curbuf))
nofile_err = TRUE;
else
apply_autocmds_exarg(EVENT_FILEWRITEPRE,
@@ -5917,7 +5918,10 @@ buf_check_timestamp(buf, focus)
#endif
#ifdef FEAT_AUTOCMD
static int busy = FALSE;
+ int n;
+ char_u *s;
#endif
+ char *reason;
/* If there is no file name, the buffer is not loaded, 'buftype' is
* set, we are in the middle of a save or being called recursively: ignore
@@ -5975,15 +5979,26 @@ buf_check_timestamp(buf, focus)
reload = TRUE;
else
{
-#ifdef FEAT_AUTOCMD
- int n;
+ if (stat_res < 0)
+ reason = "deleted";
+ else if (bufIsChanged(buf))
+ reason = "conflict";
+ else if (orig_size != buf->b_orig_size || buf_contents_changed(buf))
+ reason = "changed";
+ else if (orig_mode != buf->b_orig_mode)
+ reason = "mode";
+ else
+ reason = "time";
+#ifdef FEAT_AUTOCMD
/*
* Only give the warning if there are no FileChangedShell
* autocommands.
* Avoid being called recursively by setting "busy".
*/
busy = TRUE;
+ set_vim_var_string(VV_FCS_REASON, (char_u *)reason, -1);
+ set_vim_var_string(VV_FCS_CHOICE, (char_u *)"", -1);
n = apply_autocmds(EVENT_FILECHANGEDSHELL,
buf->b_fname, buf->b_fname, FALSE, buf);
busy = FALSE;
@@ -5991,13 +6006,19 @@ buf_check_timestamp(buf, focus)
{
if (!buf_valid(buf))
EMSG(_("E246: FileChangedShell autocommand deleted buffer"));
- return 2;
+ s = get_vim_var_str(VV_FCS_CHOICE);
+ if (STRCMP(s, "reload") == 0 && *reason != 'd')
+ reload = TRUE;
+ else if (STRCMP(s, "ask") == 0)
+ n = FALSE;
+ else
+ return 2;
}
- else
+ if (!n)
#endif
{
- if (stat_res < 0)
- mesg = _("E211: Warning: File \"%s\" no longer available");
+ if (*reason == 'd')
+ mesg = _("E211: File \"%s\" no longer available");
else
{
helpmesg = TRUE;
@@ -6010,13 +6031,22 @@ buf_check_timestamp(buf, focus)
* checked out of CVS). Always warn when the buffer was
* changed.
*/
- if (bufIsChanged(buf))
+ if (reason[2] == 'n')
+ {
mesg = _("W12: Warning: File \"%s\" has changed and the buffer was changed in Vim as well");
- else if (orig_size != buf->b_orig_size
- || buf_contents_changed(buf))
+ mesg2 = _("See \":help W12\" for more info.");
+ }
+ else if (reason[1] == 'h')
+ {
mesg = _("W11: Warning: File \"%s\" has changed since editing started");
- else if (orig_mode != buf->b_orig_mode)
+ mesg2 = _("See \":help W11\" for more info.");
+ }
+ else if (*reason == 'm')
+ {
mesg = _("W16: Warning: Mode of file \"%s\" has changed since editing started");
+ mesg2 = _("See \":help W16\" for more info.");
+ }
+ /* Else: only timestamp changed, ignored */
}
}
}
@@ -6038,9 +6068,7 @@ buf_check_timestamp(buf, focus)
path = home_replace_save(buf, buf->b_fname);
if (path != NULL)
{
- if (helpmesg)
- mesg2 = _("See \":help W11\" for more info.");
- else
+ if (!helpmesg)
mesg2 = "";
tbuf = alloc((unsigned)(STRLEN(path) + STRLEN(mesg)
+ STRLEN(mesg2) + 2));
diff --git a/src/getchar.c b/src/getchar.c
index 8328e19a1d..e93ce05290 100644
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -1483,10 +1483,14 @@ vgetc()
#endif
)
{
+ int save_allow_keys = allow_keys;
+
++no_mapping;
+ allow_keys = 0; /* make sure BS is not found */
c2 = vgetorpeek(TRUE); /* no mapping for these chars */
c = vgetorpeek(TRUE);
--no_mapping;
+ allow_keys = save_allow_keys;
if (c2 == KS_MODIFIER)
{
mod_mask = c;
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
index 8abdf86136..debc11bc45 100644
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -896,6 +896,38 @@ keyval_to_string(unsigned int keyval, unsigned int state, char_u *string)
}
#endif /* HAVE_GTK2 */
+ static int
+modifiers_gdk2vim(guint state)
+{
+ int modifiers = 0;
+
+ if (state & GDK_SHIFT_MASK)
+ modifiers |= MOD_MASK_SHIFT;
+ if (state & GDK_CONTROL_MASK)
+ modifiers |= MOD_MASK_CTRL;
+ if (state & GDK_MOD1_MASK)
+ modifiers |= MOD_MASK_ALT;
+ if (state & GDK_MOD4_MASK)
+ modifiers |= MOD_MASK_META;
+
+ return modifiers;
+}
+
+ static int
+modifiers_gdk2mouse(guint state)
+{
+ int modifiers = 0;
+
+ if (state & GDK_SHIFT_MASK)
+ modifiers |= MOUSE_SHIFT;
+ if (state & GDK_CONTROL_MASK)
+ modifiers |= MOUSE_CTRL;
+ if (state & GDK_MOD1_MASK)
+ modifiers |= MOUSE_ALT;
+
+ return modifiers;
+}
+
/*
* Main keyboard handler:
*/
@@ -1112,13 +1144,7 @@ key_press_event(GtkWidget *widget, GdkEventKey *event, gpointer data)
#endif
)
{
- modifiers = 0;
- if (state & GDK_SHIFT_MASK)
- modifiers |= MOD_MASK_SHIFT;
- if (state & GDK_CONTROL_MASK)
- modifiers |= MOD_MASK_CTRL;
- if (state & GDK_MOD1_MASK)
- modifiers |= MOD_MASK_ALT;
+ modifiers = modifiers_gdk2vim(state);
/*
* For some keys a shift modifier is translated into another key
@@ -1598,13 +1624,7 @@ process_motion_notify(int x, int y, GdkModifierType state)
}
/* translate modifier coding between the main engine and GTK */
- vim_modifiers = 0x0;
- if (state & GDK_SHIFT_MASK)
- vim_modifiers |= MOUSE_SHIFT;
- if (state & GDK_CONTROL_MASK)
- vim_modifiers |= MOUSE_CTRL;
- if (state & GDK_MOD1_MASK)
- vim_modifiers |= MOUSE_ALT;
+ vim_modifiers = modifiers_gdk2mouse(state);
/* inform the editor engine about the occurence of this event */
gui_send_mouse_event(button, x, y, FALSE, vim_modifiers);
@@ -1796,13 +1816,7 @@ button_press_event(GtkWidget *widget, GdkEventButton *event, gpointer data)
xim_reset();
#endif
- vim_modifiers = 0x0;
- if (event->state & GDK_SHIFT_MASK)
- vim_modifiers |= MOUSE_SHIFT;
- if (event->state & GDK_CONTROL_MASK)
- vim_modifiers |= MOUSE_CTRL;
- if (event->state & GDK_MOD1_MASK)
- vim_modifiers |= MOUSE_ALT;
+ vim_modifiers = modifiers_gdk2mouse(event->state);
gui_send_mouse_event(button, x, y, repeated_click, vim_modifiers);
if (gtk_main_level() > 0)
@@ -1821,7 +1835,7 @@ button_press_event(GtkWidget *widget, GdkEventButton *event, gpointer data)
scroll_event(GtkWidget *widget, GdkEventScroll *event, gpointer data)
{
int button;
- int_u vim_modifiers = 0;
+ int_u vim_modifiers;
if (gtk_socket_id != 0 && !GTK_WIDGET_HAS_FOCUS(widget))
gtk_widget_grab_focus(widget);
@@ -1844,12 +1858,7 @@ scroll_event(GtkWidget *widget, GdkEventScroll *event, gpointer data)
xim_reset();
# endif
- if (event->state & GDK_SHIFT_MASK)
- vim_modifiers |= MOUSE_SHIFT;
- if (event->state & GDK_CONTROL_MASK)
- vim_modifiers |= MOUSE_CTRL;
- if (event->state & GDK_MOD1_MASK)
- vim_modifiers |= MOUSE_ALT;
+ vim_modifiers = modifiers_gdk2mouse(event->state);
gui_send_mouse_event(button, (int)event->x, (int)event->y,
FALSE, vim_modifiers);
@@ -1881,13 +1890,7 @@ button_release_event(GtkWidget *widget, GdkEventButton *event, gpointer data)
x = event->x;
y = event->y;
- vim_modifiers = 0x0;
- if (event->state & GDK_SHIFT_MASK)
- vim_modifiers |= MOUSE_SHIFT;
- if (event->state & GDK_CONTROL_MASK)
- vim_modifiers |= MOUSE_CTRL;
- if (event->state & GDK_MOD1_MASK)
- vim_modifiers |= MOUSE_ALT;
+ vim_modifiers = modifiers_gdk2mouse(event->state);
gui_send_mouse_event(MOUSE_RELEASE, x, y, FALSE, vim_modifiers);
if (gtk_main_level() > 0)
@@ -2001,16 +2004,11 @@ drag_handle_uri_list(GdkDragContext *context,
if (fnames != NULL && nfiles > 0)
{
- int_u modifiers = 0;
+ int_u modifiers;
gtk_drag_finish(context, TRUE, FALSE, time_); /* accept */
- if (state & GDK_SHIFT_MASK)
- modifiers |= MOUSE_SHIFT;
- if (state & GDK_CONTROL_MASK)
- modifiers |= MOUSE_CTRL;
- if (state & GDK_MOD1_MASK)
- modifiers |= MOUSE_ALT;
+ modifiers = modifiers_gdk2mouse(state);
gui_handle_drop(x, y, modifiers, fnames, nfiles);
}
@@ -2061,12 +2059,7 @@ drag_handle_text(GdkDragContext *context,
vim_free(tmpbuf);
# endif
- if (state & GDK_SHIFT_MASK)
- dropkey[2] |= MOD_MASK_SHIFT;
- if (state & GDK_CONTROL_MASK)
- dropkey[2] |= MOD_MASK_CTRL;
- if (state & GDK_MOD1_MASK)
- dropkey[2] |= MOD_MASK_ALT;
+ dropkey[2] = modifiers_gdk2vim(state);
if (dropkey[2] != 0)
add_to_input_buf(dropkey, (int)sizeof(dropkey));
diff --git a/src/gui_w32.c b/src/gui_w32.c
index d6d37c4d16..2308362476 100644
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -1958,7 +1958,7 @@ gui_mch_draw_string(
++clen;
}
ExtTextOutW(s_hdc, TEXT_X(col), TEXT_Y(row),
- foptions, pcliprect, unicodebuf, clen, unicodepdy);
+ foptions, pcliprect, unicodebuf, clen, unicodepdy);
len = cells; /* used for underlining */
}
else if ((enc_codepage > 0 && (int)GetACP() != enc_codepage) || enc_latin9)
@@ -1975,8 +1975,26 @@ gui_mch_draw_string(
(char *)text, len,
(LPWSTR)unicodebuf, unibuflen);
if (len != 0)
+ {
+ /* Use unicodepdy to make characters fit as we expect, even
+ * when the font uses different widths (e.g., bold character
+ * is wider). */
+ if (unicodepdy != NULL)
+ {
+ int i;
+ int cw;
+
+ for (i = 0; i < len; ++i)
+ {
+ cw = utf_char2cells(unicodebuf[i]);
+ if (cw > 2)
+ cw = 1;
+ unicodepdy[i] = cw * gui.char_width;
+ }
+ }
ExtTextOutW(s_hdc, TEXT_X(col), TEXT_Y(row),
- foptions, pcliprect, unicodebuf, len, NULL);
+ foptions, pcliprect, unicodebuf, len, unicodepdy);
+ }
}
}
else
diff --git a/src/gui_x11.c b/src/gui_x11.c
index 6d990c5d1b..809054f0f7 100644
--- a/src/gui_x11.c
+++ b/src/gui_x11.c
@@ -998,6 +998,8 @@ gui_x11_key_hit_cb(w, dud, event, dum)
modifiers |= MOD_MASK_CTRL;
if (ev_press->state & Mod1Mask)
modifiers |= MOD_MASK_ALT;
+ if (ev_press->state & Mod4Mask)
+ modifiers |= MOD_MASK_META;
/*
* For some keys a shift modifier is translated into another key
diff --git a/src/keymap.h b/src/keymap.h
index cb79ad1e18..5babdf4af8 100644
--- a/src/keymap.h
+++ b/src/keymap.h
@@ -458,23 +458,24 @@ enum key_extra
#define MOD_MASK_SHIFT 0x02
#define MOD_MASK_CTRL 0x04
#define MOD_MASK_ALT 0x08 /* aka META */
-#define MOD_MASK_2CLICK 0x10 /* use MOD_MASK_MULTI_CLICK */
-#define MOD_MASK_3CLICK 0x20 /* use MOD_MASK_MULTI_CLICK */
-#define MOD_MASK_4CLICK 0x30 /* use MOD_MASK_MULTI_CLICK */
+#define MOD_MASK_META 0x10 /* META when it's different from ALT */
+#define MOD_MASK_2CLICK 0x20 /* use MOD_MASK_MULTI_CLICK */
+#define MOD_MASK_3CLICK 0x40 /* use MOD_MASK_MULTI_CLICK */
+#define MOD_MASK_4CLICK 0x60 /* use MOD_MASK_MULTI_CLICK */
#ifdef MACOS
-# define MOD_MASK_CMD 0x80
+# define MOD_MASK_CMD 0x80
#endif
#define MOD_MASK_MULTI_CLICK (MOD_MASK_2CLICK|MOD_MASK_3CLICK|MOD_MASK_4CLICK)
/*
* The length of the longest special key name, including modifiers.
- * Current longest is <M-C-S-4-MiddleRelease> (length includes '<' and '>').
+ * Current longest is <M-C-S-T-4-MiddleRelease> (length includes '<' and '>').
*/
-#define MAX_KEY_NAME_LEN 23
+#define MAX_KEY_NAME_LEN 25
/* Maximum length of a special key event as tokens. This includes modifiers.
- * The longest event is something like <M-C-S-4-LeftDrag> which would be the
+ * The longest event is something like <M-C-S-T-4-LeftDrag> which would be the
* following string of tokens:
*
* <K_SPECIAL> <KS_MODIFIER> bitmask <K_SPECIAL> <KS_EXTRA> <KT_LEFTDRAG>.
diff --git a/src/misc2.c b/src/misc2.c
index d5a80929be..9b21168d84 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -1644,6 +1644,7 @@ static struct modmasktable
} mod_mask_table[] =
{
{MOD_MASK_ALT, MOD_MASK_ALT, (char_u)'M'},
+ {MOD_MASK_META, MOD_MASK_META, (char_u)'T'},
{MOD_MASK_CTRL, MOD_MASK_CTRL, (char_u)'C'},
{MOD_MASK_SHIFT, MOD_MASK_SHIFT, (char_u)'S'},
{MOD_MASK_MULTI_CLICK, MOD_MASK_2CLICK, (char_u)'2'},
diff --git a/src/normal.c b/src/normal.c
index 2d2efc2f31..9bf2e66b7c 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -2257,7 +2257,8 @@ do_mouse(oap, c, dir, count, fixindent)
* multiple clicks and the middle mouse button.
* Accept shift-leftmouse drags when 'mousemodel' is "popup.*".
*/
- if ((mod_mask & (MOD_MASK_SHIFT | MOD_MASK_CTRL | MOD_MASK_ALT))
+ if ((mod_mask & (MOD_MASK_SHIFT | MOD_MASK_CTRL | MOD_MASK_ALT
+ | MOD_MASK_META))
&& (!is_click
|| (mod_mask & MOD_MASK_MULTI_CLICK)
|| which_button == MOUSE_MIDDLE)
diff --git a/src/option.c b/src/option.c
index 5cf1b46209..e7210b3f96 100644
--- a/src/option.c
+++ b/src/option.c
@@ -3149,11 +3149,13 @@ set_init_2()
* with a dark background, that can handle color. Recognized are:
* "linux" Linux console
* "screen.linux" Linux console with screen
+ * "cygwin" Cygwin shell
*/
idx = findoption((char_u *)"bg");
if (!(options[idx].flags & P_WAS_SET)
&& (STRCMP(T_NAME, "linux") == 0
- || STRCMP(T_NAME, "screen.linux") == 0))
+ || STRCMP(T_NAME, "screen.linux") == 0
+ || STRCMP(T_NAME, "cygwin") == 0))
{
set_string_option_direct(NULL, idx, (char_u *)"dark", OPT_FREE);
/* don't mark it as set, when starting the GUI it may be changed
diff --git a/src/os_mac_conv.c b/src/os_mac_conv.c
index 68d46c0f2b..eed0ebbe96 100644
--- a/src/os_mac_conv.c
+++ b/src/os_mac_conv.c
@@ -292,7 +292,13 @@ mac_conv_init()
if (TECCreateConverter(&gUTF16ToUTF8Converter, utf16_encoding,
utf8_canon_encoding) != noErr)
- gUTF16ToUTF8Converter = NULL;
+ {
+ /* On pre-10.3, Unicode normalization is not available so
+ * fall back to non-normalizing converter */
+ if (TECCreateConverter(&gUTF16ToUTF8Converter, utf16_encoding,
+ utf8_encoding) != noErr)
+ gUTF16ToUTF8Converter = NULL;
+ }
}
/*
diff --git a/src/os_mswin.c b/src/os_mswin.c
index 4f3a49bef2..5e96da8afe 100644
--- a/src/os_mswin.c
+++ b/src/os_mswin.c
@@ -385,6 +385,7 @@ mch_FullName(
else
#endif
{
+#ifdef FEAT_MBYTE
if (enc_codepage >= 0 && (int)GetACP() != enc_codepage
# ifdef __BORLANDC__
/* Wide functions of Borland C 5.5 do not work on Windows 98. */
@@ -415,7 +416,6 @@ mch_FullName(
vim_free(wname);
vim_free(cname);
}
-#ifdef FEAT_MBYTE
if (nResult == FAIL) /* fall back to non-wide function */
#endif
{
@@ -2487,8 +2487,13 @@ serverSendEnc(HWND target)
COPYDATASTRUCT data;
data.dwData = COPYDATA_ENCODING;
+#ifdef FEAT_MBYTE
data.cbData = STRLEN(p_enc) + 1;
data.lpData = p_enc;
+#else
+ data.cbData = STRLEN("latin1") + 1;
+ data.lpData = "latin1";
+#endif
(void)SendMessage(target, WM_COPYDATA, (WPARAM)message_window,
(LPARAM)(&data));
}
diff --git a/src/po/ja.po b/src/po/ja.po
index 17d94d5160..8b8559efcb 100644
--- a/src/po/ja.po
+++ b/src/po/ja.po
@@ -3,188 +3,188 @@
# Do ":help uganda" in Vim to read copying and usage conditions.
# Do ":help credits" in Vim to see a list of people who contributed.
#
-# MURAOKA Taro <koron@tka.att.ne.jp>, 2001-4.
-# Last Change: 29-Apr-2004.
+# MURAOKA Taro <koron@tka.att.ne.jp>, 2001-5.
+# Last Change: 05-Mar-2005.
#
msgid ""
msgstr ""
-"Project-Id-Version: Vim 6.2\n"
-"POT-Creation-Date: 2004-04-29 13:16+0900\n"
-"PO-Revision-Date: 2004-04-29 13:00+0900\n"
+"Project-Id-Version: Vim 7.0\n"
+"POT-Creation-Date: 2005-03-04 13:11+0900\n"
+"PO-Revision-Date: 2004-03-05 00:50+0900\n"
"Last-Translator: MURAOKA Taro <koron@tka.att.ne.jp>\n"
"Language-Team: MURAOKA Taro <koron@tka.att.ne.jp>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=euc-jp\n"
"Content-Transfer-Encoding: 8-bit\n"
-#: buffer.c:102
+#: ../buffer.c:102
msgid "E82: Cannot allocate any buffer, exiting..."
msgstr "E82: バッファを1つも作成できないので, 終了します..."
-#: buffer.c:105
+#: ../buffer.c:105
msgid "E83: Cannot allocate buffer, using other one..."
msgstr "E83: バッファを作成できないので, 他のを使用します..."
-#: buffer.c:805
+#: ../buffer.c:857
msgid "E515: No buffers were unloaded"
msgstr "E515: 解放されたバッファはありません"
-#: buffer.c:807
+#: ../buffer.c:859
msgid "E516: No buffers were deleted"
msgstr "E516: 削除されたバッファはありません"
-#: buffer.c:809
+#: ../buffer.c:861
msgid "E517: No buffers were wiped out"
msgstr "E517: 破棄されたバッファはありません"
-#: buffer.c:817
+#: ../buffer.c:869
msgid "1 buffer unloaded"
msgstr "1 個のバッファが解放されました"
-#: buffer.c:819
+#: ../buffer.c:871
#, c-format
msgid "%d buffers unloaded"
msgstr "%d 個のバッファが解放されました"
-#: buffer.c:824
+#: ../buffer.c:876
msgid "1 buffer deleted"
msgstr "1 個のバッファが削除されました"
-#: buffer.c:826
+#: ../buffer.c:878
#, c-format
msgid "%d buffers deleted"
msgstr "%d 個のバッファが削除されました"
-#: buffer.c:831
+#: ../buffer.c:883
msgid "1 buffer wiped out"
msgstr "1 個のバッファが破棄されました"
-#: buffer.c:833
+#: ../buffer.c:885
#, c-format
msgid "%d buffers wiped out"
msgstr "%d 個のバッファが破棄されました"
-#: buffer.c:894
+#: ../buffer.c:946
msgid "E84: No modified buffer found"
msgstr "E84: 変更されたバッファはありません"
#. back where we started, didn't find anything.
-#: buffer.c:933
+#: ../buffer.c:985
msgid "E85: There is no listed buffer"
msgstr "E85: リスト表示されるバッファはありません"
-#: buffer.c:945
+#: ../buffer.c:997
#, c-format
msgid "E86: Buffer %ld does not exist"
msgstr "E86: バッファ %ld はありません"
-#: buffer.c:948
+#: ../buffer.c:1000
msgid "E87: Cannot go beyond last buffer"
msgstr "E87: 最後のバッファを越えて移動はできません"
-#: buffer.c:950
+#: ../buffer.c:1002
msgid "E88: Cannot go before first buffer"
msgstr "E88: 最初のバッファより前へは移動できません"
-#: buffer.c:988
+#: ../buffer.c:1044
#, c-format
msgid "E89: No write since last change for buffer %ld (add ! to override)"
msgstr "E89: バッファ %ld の変更は保存されていません (! で変更を破棄)"
-#: buffer.c:1005
+#: ../buffer.c:1061
msgid "E90: Cannot unload last buffer"
msgstr "E90: 最後のバッファは解放できません"
-#: buffer.c:1538
+#: ../buffer.c:1611
msgid "W14: Warning: List of file names overflow"
-msgstr "W14: 警告: ファイル名のリストが長すぎます"
+msgstr "W14: 警告: ファイル名のリストが長過ぎます"
-#: buffer.c:1709
+#: ../buffer.c:1795
#, c-format
msgid "E92: Buffer %ld not found"
msgstr "E92: バッファ %ld がみつかりません"
-#: buffer.c:1940
+#: ../buffer.c:2058
#, c-format
msgid "E93: More than one match for %s"
msgstr "E93: %s に複数の該当がありました"
-#: buffer.c:1942
+#: ../buffer.c:2060
#, c-format
msgid "E94: No matching buffer for %s"
msgstr "E94: %s に該当するバッファはありませんでした"
-#: buffer.c:2337
+#: ../buffer.c:2473
#, c-format
msgid "line %ld"
msgstr "行 %ld"
-#: buffer.c:2420
+#: ../buffer.c:2561
msgid "E95: Buffer with this name already exists"
msgstr "E95: この名前のバッファは既にあります"
-#: buffer.c:2713
+#: ../buffer.c:2878
msgid " [Modified]"
msgstr " [変更あり]"
-#: buffer.c:2718
+#: ../buffer.c:2883
msgid "[Not edited]"
msgstr "[未編集]"
-#: buffer.c:2723
+#: ../buffer.c:2888
msgid "[New file]"
msgstr "[新ファイル]"
-#: buffer.c:2724
+#: ../buffer.c:2889
msgid "[Read errors]"
msgstr "[読込エラー]"
-#: buffer.c:2726 fileio.c:2049
+#: ../buffer.c:2891 ../fileio.c:2106 ../netbeans.c:3418
msgid "[readonly]"
msgstr "[読込専用]"
-#: buffer.c:2747
+#: ../buffer.c:2912
msgid "1 line --%d%%--"
msgstr "1 行 --%d%%--"
-#: buffer.c:2749
+#: ../buffer.c:2914
msgid "%ld lines --%d%%--"
msgstr "%ld 行 --%d%%--"
-#: buffer.c:2756
+#: ../buffer.c:2921
msgid "line %ld of %ld --%d%%-- col "
msgstr "行 %ld (全体 %ld) --%d%%-- col "
-#: buffer.c:2864
-msgid "[No file]"
-msgstr "[無題]"
+#: ../buffer.c:3029 ../buffer.c:4750 ../memline.c:1657
+msgid "[No Name]"
+msgstr "[無名]"
#. must be a help buffer
-#: buffer.c:2904
+#: ../buffer.c:3068
msgid "help"
msgstr "ヘルプ"
-#: buffer.c:3463 screen.c:5038
+#: ../buffer.c:3619 ../screen.c:5071
msgid "[help]"
msgstr "[ヘルプ]"
-#: buffer.c:3495 screen.c:5044
+#: ../buffer.c:3651 ../screen.c:5077
msgid "[Preview]"
msgstr "[プレビュー]"
-#: buffer.c:3775
+#: ../buffer.c:3931
msgid "All"
msgstr "全て"
-#: buffer.c:3775
+#: ../buffer.c:3931
msgid "Bot"
msgstr "末尾"
-#: buffer.c:3777
+#: ../buffer.c:3933
msgid "Top"
msgstr "先頭"
-#: buffer.c:4523
+#: ../buffer.c:4702
msgid ""
"\n"
"# Buffer list:\n"
@@ -192,15 +192,11 @@ msgstr ""
"\n"
"# バッファリスト:\n"
-#: buffer.c:4556
+#: ../buffer.c:4737
msgid "[Error List]"
msgstr "[エラーリスト]"
-#: buffer.c:4569 memline.c:1520
-msgid "[No File]"
-msgstr "[無題]"
-
-#: buffer.c:4882
+#: ../buffer.c:5063
msgid ""
"\n"
"--- Signs ---"
@@ -208,150 +204,154 @@ msgstr ""
"\n"
"--- サイン ---"
-#: buffer.c:4901
+#: ../buffer.c:5082
#, c-format
msgid "Signs for %s:"
msgstr "%s のサイン:"
-#: buffer.c:4907
+#: ../buffer.c:5088
#, c-format
msgid " line=%ld id=%d name=%s"
msgstr " 行=%ld 識別子=%d 名前=%s"
-#: diff.c:139
+#: ../diff.c:163
#, c-format
msgid "E96: Can not diff more than %ld buffers"
msgstr "E96: %ld 以上のバッファはdiffできません"
-#: diff.c:709
+#: ../diff.c:737
msgid "E97: Cannot create diffs"
msgstr "E97: 差分を作成できません "
-#: diff.c:814
+#: ../diff.c:843
msgid "Patch file"
msgstr "パッチファイル"
-#: diff.c:1065
+#: ../diff.c:1146
msgid "E98: Cannot read diff output"
msgstr "E98: diffの出力を読込めません"
-#: diff.c:1815
+#: ../diff.c:1896
msgid "E99: Current buffer is not in diff mode"
msgstr "E99: 現在のバッファは差分モードではありません"
-#: diff.c:1827
+#: ../diff.c:1908
msgid "E100: No other buffer in diff mode"
msgstr "E100: 差分モードである他のバッファはありません"
-#: diff.c:1835
+#: ../diff.c:1916
msgid "E101: More than two buffers in diff mode, don't know which one to use"
msgstr ""
"E101: 差分モードのバッファが2個以上あるので、どれを使うか特定できません"
-#: diff.c:1858
+#: ../diff.c:1939
#, c-format
msgid "E102: Can't find buffer \"%s\""
msgstr "E102: バッファ \"%s\" がみつかりません"
-#: diff.c:1864
+#: ../diff.c:1945
#, c-format
msgid "E103: Buffer \"%s\" is not in diff mode"
msgstr "E103: バッファ \"%s\" は差分モードではありません"
-#: digraph.c:2199
+#: ../digraph.c:2200
msgid "E104: Escape not allowed in digraph"
msgstr "E104: 合字にEscapeは使用できません"
-#: digraph.c:2384
+#: ../digraph.c:2384
msgid "E544: Keymap file not found"
msgstr "E544: キーマップファイルがみつかりません"
-#: digraph.c:2411
+#: ../digraph.c:2411
msgid "E105: Using :loadkeymap not in a sourced file"
msgstr "E