summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/INSTALLpc.txt3
-rwxr-xr-xsrc/auto/configure3
-rw-r--r--src/config.h.in1
-rw-r--r--src/configure.in2
-rw-r--r--src/eval.c2
-rw-r--r--src/ex_docmd.c1
-rw-r--r--src/ex_getln.c3
-rw-r--r--src/feature.h3
-rw-r--r--src/gui.c10
-rw-r--r--src/gui_mac.c81
-rw-r--r--src/gui_motif.c4
-rw-r--r--src/gui_w48.c22
-rw-r--r--src/memline.c5
-rw-r--r--src/menu.c29
-rw-r--r--src/misc1.c3
-rw-r--r--src/option.c123
-rw-r--r--src/po/de.po4
-rw-r--r--src/po/fr.po243
-rw-r--r--src/po/it.po4
-rw-r--r--src/po/ja.po4
-rw-r--r--src/po/ja.sjis.po4
-rw-r--r--src/po/pl.UTF-8.po4
-rw-r--r--src/po/pl.cp1250.po4
-rw-r--r--src/po/pl.po4
-rw-r--r--src/po/sk.cp1250.po4
-rw-r--r--src/po/sk.po4
-rw-r--r--src/po/sv.po4
-rw-r--r--src/po/zh_CN.UTF-8.po4
-rw-r--r--src/po/zh_CN.cp936.po4
-rw-r--r--src/po/zh_CN.po4
-rw-r--r--src/popupmnu.c34
-rw-r--r--src/syntax.c6
-rw-r--r--src/tag.c1
-rw-r--r--src/version.h6
34 files changed, 402 insertions, 235 deletions
diff --git a/src/INSTALLpc.txt b/src/INSTALLpc.txt
index 106c767037..d2a3e2835d 100644
--- a/src/INSTALLpc.txt
+++ b/src/INSTALLpc.txt
@@ -143,8 +143,7 @@ is also available through the Platform SDK, |ms-platform-sdk|.
Visual C++ 2005 Express Edition
-------------------------------
-Visual C++ 2005 Express Edition can be downloaded for free
-before November 2006 from
+Visual C++ 2005 Express Edition can be downloaded for free from:
http://msdn.microsoft.com/vstudio/express/visualC/default.aspx
This includes the IDE and the debugger. You will also need
|ms-platform-sdk|. You can build Vim with Make_mvc.mak.
diff --git a/src/auto/configure b/src/auto/configure
index ed5ea56171..7a308a7e8d 100755
--- a/src/auto/configure
+++ b/src/auto/configure
@@ -8986,8 +8986,9 @@ if test -z "$SKIP_MOTIF"; then
+
for ac_header in Xm/Xm.h Xm/XpmP.h Xm/JoinSideT.h Xm/TraitP.h Xm/Manager.h \
- Xm/UnhighlightT.h
+ Xm/UnhighlightT.h Xm/Notebook.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
diff --git a/src/config.h.in b/src/config.h.in
index 8e0863a25d..9b42b92ef7 100644
--- a/src/config.h.in
+++ b/src/config.h.in
@@ -239,6 +239,7 @@
#undef HAVE_XM_MANAGER_H
#undef HAVE_XM_UNHIGHLIGHTT_H
#undef HAVE_XM_JOINSIDET_H
+#undef HAVE_XM_NOTEBOOK_H
#undef HAVE_X11_XPM_H
#undef HAVE_X11_XMU_EDITRES_H
#undef HAVE_X11_SM_SMLIB_H
diff --git a/src/configure.in b/src/configure.in
index 21a5f80c02..6a1a56f082 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -1901,7 +1901,7 @@ if test -z "$SKIP_MOTIF"; then
cppflags_save=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
AC_CHECK_HEADERS(Xm/Xm.h Xm/XpmP.h Xm/JoinSideT.h Xm/TraitP.h Xm/Manager.h \
- Xm/UnhighlightT.h)
+ Xm/UnhighlightT.h Xm/Notebook.h)
if test $ac_cv_header_Xm_XpmP_h = yes; then
dnl Solaris uses XpmAttributes_21, very annoying.
diff --git a/src/eval.c b/src/eval.c
index 1f208b9180..1e75a31a3b 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -8863,7 +8863,6 @@ f_expand(argvars, rettv)
ExpandInit(&xpc);
xpc.xp_context = EXPAND_FILES;
rettv->vval.v_string = ExpandOne(&xpc, s, NULL, flags, WILD_ALL);
- ExpandCleanup(&xpc);
}
else
rettv->vval.v_string = NULL;
@@ -10397,7 +10396,6 @@ f_glob(argvars, rettv)
rettv->v_type = VAR_STRING;
rettv->vval.v_string = ExpandOne(&xpc, get_tv_string(&argvars[0]),
NULL, WILD_USE_NL|WILD_SILENT, WILD_ALL);
- ExpandCleanup(&xpc);
}
/*
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 27c44ff5bf..4943bfcfb4 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -4371,7 +4371,6 @@ expand_filename(eap, cmdlinep, errormsgp)
p = ExpandOne(&xpc, eap->arg, NULL,
WILD_LIST_NOTFOUND|WILD_ADD_SLASH,
WILD_EXPAND_FREE);
- ExpandCleanup(&xpc);
if (p == NULL)
return FAIL;
}
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 10f33550da..ce48b67515 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -3260,7 +3260,8 @@ nextwild(xp, type, options)
* Return a pointer to alloced memory containing the new string.
* Return NULL for failure.
*
- * Results are cached in xp->xp_files and xp->xp_numfiles.
+ * Results are cached in xp->xp_files and xp->xp_numfiles, except when "mode"
+ * is WILD_EXPAND_FREE or WILD_ALL.
*
* mode = WILD_FREE: just free previously expanded matches
* mode = WILD_EXPAND_FREE: normal expansion, do not keep matches
diff --git a/src/feature.h b/src/feature.h
index fdd7a295fd..82508fdca3 100644
--- a/src/feature.h
+++ b/src/feature.h
@@ -753,7 +753,8 @@
/*
* GUI tabline
*/
-#if defined(FEAT_WINDOWS) && (defined(FEAT_GUI_GTK) || defined(FEAT_GUI_MOTIF)\
+#if defined(FEAT_WINDOWS) && (defined(FEAT_GUI_GTK) \
+ || (defined(FEAT_GUI_MOTIF) && defined(HAVE_XM_NOTEBOOK_H)) \
|| (defined(FEAT_GUI_MSWIN) && (!defined(_MSC_VER) || _MSC_VER > 1020)))
# define FEAT_GUI_TABLINE
#endif
diff --git a/src/gui.c b/src/gui.c
index c377a35dff..755c20c1f4 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -3491,7 +3491,7 @@ get_tabline_label(tp)
/*
* Send the event for clicking to select tab page "nr".
* Returns TRUE if it was done, FALSE when skipped because we are already at
- * that tab page.
+ * that tab page or the cmdline window is open.
*/
int
send_tabline_event(nr)
@@ -3501,6 +3501,14 @@ send_tabline_event(nr)
if (nr == tabpage_index(curtab))
return FALSE;
+# ifdef FEAT_CMDWIN
+ if (cmdwin_type != 0)
+ {
+ /* Set it back to the current tab page. */
+ gui_mch_set_curtab(tabpage_index(curtab));
+ return FALSE;
+ }
+# endif
string[0] = CSI;
string[1] = KS_TABLINE;
string[2] = KE_FILLER;
diff --git a/src/gui_mac.c b/src/gui_mac.c
index 762d30c955..4ebc1216f1 100644
--- a/src/gui_mac.c
+++ b/src/gui_mac.c
@@ -48,6 +48,11 @@
/* Vim's Scrap flavor. */
#define VIMSCRAPFLAVOR 'VIM!'
+#ifdef FEAT_MBYTE
+# define SCRAPTEXTFLAVOR kScrapFlavorTypeUnicode
+#else
+# define SCRAPTEXTFLAVOR kScrapFlavorTypeText
+#endif
static EventHandlerUPP mouseWheelHandlerUPP = NULL;
SInt32 gMacSystemVersion;
@@ -4427,69 +4432,65 @@ clip_mch_request_selection(VimClipboard *cbd)
if (flavor == 0)
{
- error = GetScrapFlavorFlags(scrap, kScrapFlavorTypeUnicode, &scrapFlags);
+ error = GetScrapFlavorFlags(scrap, SCRAPTEXTFLAVOR, &scrapFlags);
if (error != noErr)
return;
- error = GetScrapFlavorSize(scrap, kScrapFlavorTypeUnicode, &scrapSize);
+ error = GetScrapFlavorSize(scrap, SCRAPTEXTFLAVOR, &scrapSize);
if (error != noErr)
return;
}
ReserveMem(scrapSize);
- {
- /* In CARBON we don't need a Handle, a pointer is good */
- textOfClip = NewHandle(scrapSize);
- /* tempclip = lalloc(scrapSize+1, TRUE); */
- HLock(textOfClip);
- error = GetScrapFlavorData(scrap,
- flavor ? VIMSCRAPFLAVOR : kScrapFlavorTypeUnicode,
- &scrapSize, *textOfClip);
- scrapSize -= flavor;
+ /* In CARBON we don't need a Handle, a pointer is good */
+ textOfClip = NewHandle(scrapSize);
- if (flavor)
- type = **textOfClip;
- else
- type = (strchr(*textOfClip, '\r') != NULL) ? MLINE : MCHAR;
+ /* tempclip = lalloc(scrapSize+1, TRUE); */
+ HLock(textOfClip);
+ error = GetScrapFlavorData(scrap,
+ flavor ? VIMSCRAPFLAVOR : SCRAPTEXTFLAVOR,
+ &scrapSize, *textOfClip);
+ scrapSize -= flavor;
- tempclip = lalloc(scrapSize + 1, TRUE);
-#if defined(FEAT_MBYTE)
- mch_memmove(tempclip, *textOfClip + flavor, scrapSize);
-#else
- STRNCPY(tempclip, *textOfClip + flavor, scrapSize);
-#endif
- tempclip[scrapSize] = 0;
+ if (flavor)
+ type = **textOfClip;
+ else
+ type = (strchr(*textOfClip, '\r') != NULL) ? MLINE : MCHAR;
+
+ tempclip = lalloc(scrapSize + 1, TRUE);
+ mch_memmove(tempclip, *textOfClip + flavor, scrapSize);
+ tempclip[scrapSize] = 0;
#ifdef MACOS_CONVERT
+ {
/* Convert from utf-16 (clipboard) */
size_t encLen = 0;
char_u *to = mac_utf16_to_enc((UniChar *)tempclip, scrapSize, &encLen);
- if (to)
+
+ if (to != NULL)
{
scrapSize = encLen;
vim_free(tempclip);
tempclip = to;
}
+ }
#endif
- searchCR = (char *)tempclip;
- while (searchCR != NULL)
- {
- searchCR = strchr(searchCR, '\r');
-
- if (searchCR != NULL)
- searchCR[0] = '\n';
-
- }
+ searchCR = (char *)tempclip;
+ while (searchCR != NULL)
+ {
+ searchCR = strchr(searchCR, '\r');
+ if (searchCR != NULL)
+ *searchCR = '\n';
+ }
- clip_yank_selection(type, tempclip, scrapSize, cbd);
+ clip_yank_selection(type, tempclip, scrapSize, cbd);
- vim_free(tempclip);
- HUnlock(textOfClip);
+ vim_free(tempclip);
+ HUnlock(textOfClip);
- DisposeHandle(textOfClip);
- }
+ DisposeHandle(textOfClip);
}
void
@@ -4527,12 +4528,10 @@ clip_mch_set_selection(VimClipboard *cbd)
/*
* Once we set the clipboard, lose ownership. If another application sets
* the clipboard, we don't want to think that we still own it.
- *
*/
-
cbd->owned = FALSE;
- type = clip_convert_selection(&str, (long_u *) &scrapSize, cbd);
+ type = clip_convert_selection(&str, (long_u *)&scrapSize, cbd);
#ifdef MACOS_CONVERT
size_t utf16_len = 0;
@@ -4555,7 +4554,7 @@ clip_mch_set_selection(VimClipboard *cbd)
**textOfClip = type;
mch_memmove(*textOfClip + 1, str, scrapSize);
GetCurrentScrap(&scrap);
- PutScrapFlavor(scrap, kScrapFlavorTypeUnicode, kScrapFlavorMaskNone,
+ PutScrapFlavor(scrap, SCRAPTEXTFLAVOR, kScrapFlavorMaskNone,
scrapSize, *textOfClip + 1);
PutScrapFlavor(scrap, VIMSCRAPFLAVOR, kScrapFlavorMaskNone,
scrapSize + 1, *textOfClip);
diff --git a/src/gui_motif.c b/src/gui_motif.c
index 7eb57589c4..9e28be2b05 100644
--- a/src/gui_motif.c
+++ b/src/gui_motif.c
@@ -26,7 +26,6 @@
#include <Xm/LabelG.h>
#include <Xm/ToggleBG.h>
#include <Xm/SeparatoG.h>
-#include <Xm/Notebook.h>
#include <Xm/XmP.h>
#include <X11/keysym.h>
@@ -43,6 +42,9 @@
# include <Xm/XpmP.h>
# endif
#endif
+#ifdef HAVE_XM_NOTEBOOK_H
+# include <Xm/Notebook.h>
+#endif
#include "gui_xmebw.h" /* for our Enhanced Button Widget */
diff --git a/src/gui_w48.c b/src/gui_w48.c
index 13e032493b..6e4ec1ad69 100644
--- a/src/gui_w48.c
+++ b/src/gui_w48.c
@@ -2296,18 +2296,26 @@ gui_mch_update_tabline(void)
int curtabidx = 0;
RECT rc;
#ifdef FEAT_MBYTE
+ static int use_unicode = FALSE;
+ int uu;
WCHAR *wstr = NULL;
#endif
if (s_tabhwnd == NULL)
return;
-#if defined(FEAT_MBYTE) && defined(CCM_SETUNICODEFORMAT)
- if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
- /*
- * Enable unicode support
- */
- SendMessage(s_tabhwnd, CCM_SETUNICODEFORMAT, (WPARAM)TRUE, (LPARAM)0);
+#if defined(FEAT_MBYTE)
+# ifndef CCM_SETUNICODEFORMAT
+ /* For older compilers. We assume this never changes. */
+# define CCM_SETUNICODEFORMAT 0x2005
+# endif
+ uu = (enc_codepage >= 0 && (int)GetACP() != enc_codepage);
+ if (uu != use_unicode)
+ {
+ /* Enable/disable unicode support */
+ SendMessage(s_tabhwnd, CCM_SETUNICODEFORMAT, (WPARAM)uu, (LPARAM)0);
+ use_unicode = uu;
+ }
#endif
tie.mask = TCIF_TEXT;
@@ -2330,7 +2338,7 @@ gui_mch_update_tabline(void)
tie.pszText = NameBuff;
#ifdef FEAT_MBYTE
wstr = NULL;
- if (enc_codepage >= 0 && (int)GetACP() != enc_codepage)
+ if (use_unicode)
{
/* Need to go through Unicode. */
wstr = enc_to_ucs2(NameBuff, NULL);
diff --git a/src/memline.c b/src/memline.c
index 9284abbda2..e86a792a5a 100644
--- a/src/memline.c
+++ b/src/memline.c
@@ -1532,7 +1532,7 @@ recover_names(fname, list, nr)
files[i] = files[i + 1];
}
}
- if (nr)
+ if (nr > 0)
{
file_count += num_files;
if (nr <= file_count)
@@ -1578,7 +1578,8 @@ recover_names(fname, list, nr)
for (i = 0; i < num_names; ++i)
vim_free(names[i]);
- FreeWild(num_files, files);
+ if (num_files > 0)
+ FreeWild(num_files, files);
}
vim_free(dir_name);
return file_count;
diff --git a/src/menu.c b/src/menu.c
index b4f06d2424..55fba1fd69 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -2336,20 +2336,23 @@ ex_menutranslate(eap)
{
tp = (menutrans_T *)menutrans_ga.ga_data;
from = vim_strsave(from);
- from_noamp = menu_text(from, NULL, NULL);
- to = vim_strnsave(to, (int)(arg - to));
- if (from != NULL && from_noamp != NULL && to != NULL)
+ if (from != NULL)
{
- tp[menutrans_ga.ga_len].from = from;
- tp[menutrans_ga.ga_len].from_noamp = from_noamp;
- tp[menutrans_ga.ga_len].to = to;
- ++menutrans_ga.ga_len;
- }
- else
- {
- vim_free(from);
- vim_free(from_noamp);
- vim_free(to);
+ from_noamp = menu_text(from, NULL, NULL);
+ to = vim_strnsave(to, (int)(arg - to));
+ if (from_noamp != NULL && to != NULL)
+ {
+ tp[menutrans_ga.ga_len].from = from;
+ tp[menutrans_ga.ga_len].from_noamp = from_noamp;
+ tp[menutrans_ga.ga_len].to = to;
+ ++menutrans_ga.ga_len;
+ }
+ else
+ {
+ vim_free(from);
+ vim_free(from_noamp);
+ vim_free(to);
+ }
}
}
}
diff --git a/src/misc1.c b/src/misc1.c
index 7d86e460e1..67a2fc06de 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -3625,7 +3625,6 @@ expand_env_esc(srcp, dst, dstlen, esc, startstr)
xpc.xp_context = EXPAND_FILES;
var = ExpandOne(&xpc, dst, NULL,
WILD_ADD_SLASH|WILD_SILENT, WILD_EXPAND_FREE);
- ExpandCleanup(&xpc);
mustfree = TRUE;
}
@@ -9363,7 +9362,7 @@ FreeWild(count, files)
int count;
char_u **files;
{
- if (files == NULL || count <= 0)
+ if (count <= 0 || files == NULL)
return;
#if defined(__EMX__) && defined(__ALWAYS_HAS_TRAILING_NULL_POINTER) /* XXX */
/*
diff --git a/src/option.c b/src/option.c
index 29ab1efe8d..cfca188d9b 100644
--- a/src/option.c
+++ b/src/option.c
@@ -2996,35 +2996,44 @@ set_init_1()
* 'maxmemtot' and 'maxmem' may have to be adjusted for available memory
*/
opt_idx = findoption((char_u *)"maxmemtot");
+ if (opt_idx >= 0)
+ {
#if !defined(HAVE_AVAIL_MEM) && !defined(HAVE_TOTAL_MEM)
- if (options[opt_idx].def_val[VI_DEFAULT] == (char_u *)0L)
+ if (options[opt_idx].def_val[VI_DEFAULT] == (char_u *)0L)
#endif
- {
+ {
#ifdef HAVE_AVAIL_MEM
- /* Use amount of memory available at this moment. */
- n = (mch_avail_mem(FALSE) >> 11);
+ /* Use amount of memory available at this moment. */
+ n = (mch_avail_mem(FALSE) >> 11);
#else
# ifdef HAVE_TOTAL_MEM
- /* Use amount of memory available to Vim. */
- n = (mch_total_mem(FALSE) >> 11);
+ /* Use amount of memory available to Vim. */
+ n = (mch_total_mem(FALSE) >> 11);
# else
- n = (0x7fffffff >> 11);
+ n = (0x7fffffff >> 11);
# endif
#endif
- options[opt_idx].def_val[VI_DEFAULT] = (char_u *)n;
- opt_idx = findoption((char_u *)"maxmem");
+ options[opt_idx].def_val[VI_DEFAULT] = (char_u *)n;
+ opt_idx = findoption((char_u *)"maxmem");
+ if (opt_idx >= 0)
+ {
#if !defined(HAVE_AVAIL_MEM) && !defined(HAVE_TOTAL_MEM)
- if ((long)options[opt_idx].def_val[VI_DEFAULT] > n
- || (long)options[opt_idx].def_val[VI_DEFAULT] == 0L)
+ if ((long)options[opt_idx].def_val[VI_DEFAULT] > n
+ || (long)options[opt_idx].def_val[VI_DEFAULT] == 0L)
#endif
- options[opt_idx].def_val[VI_DEFAULT] = (char_u *)n;
+ options[opt_idx].def_val[VI_DEFAULT] = (char_u *)n;
+ }
+ }
}
#ifdef FEAT_GUI_W32
/* force 'shortname' for Win32s */
if (gui_is_win32s())
- options[findoption((char_u *)"shortname")].def_val[VI_DEFAULT] =
- (char_u *)TRUE;
+ {
+ opt_idx = findoption((char_u *)"shortname");
+ if (opt_idx >= 0)
+ options[opt_idx].def_val[VI_DEFAULT] = (char_u *)TRUE;
+ }
#endif
#ifdef FEAT_SEARCHPATH
@@ -3057,8 +3066,11 @@ set_init_1()
}
buf[j] = NUL;
opt_idx = findoption((char_u *)"cdpath");
- options[opt_idx].def_val[VI_DEFAULT] = buf;
- options[opt_idx].flags |= P_DEF_ALLOCED;
+ if (opt_idx >= 0)
+ {
+ options[opt_idx].def_val[VI_DEFAULT] = buf;
+ options[opt_idx].flags |= P_DEF_ALLOCED;
+ }
}
if (mustfree)
vim_free(cdpath);
@@ -3259,8 +3271,11 @@ set_init_1()
if (mb_init() == NULL)
{
opt_idx = findoption((char_u *)"encoding");
- options[opt_idx].def_val[VI_DEFAULT] = p_enc;
- options[opt_idx].flags |= P_DEF_ALLOCED;
+ if (opt_idx >= 0)
+ {
+ options[opt_idx].def_val[VI_DEFAULT] = p_enc;
+ options[opt_idx].flags |= P_DEF_ALLOCED;
+ }
#if defined(MSDOS) || defined(MSWIN) || defined(OS2) || defined(MACOS) \
|| defined(VMS)
@@ -3278,9 +3293,11 @@ set_init_1()
set_string_option_direct((char_u *)"isk", -1,
ISK_LATIN1, OPT_FREE, SID_NONE);
opt_idx = findoption((char_u *)"isp");
- options[opt_idx].def_val[VIM_DEFAULT] = ISP_LATIN1;
+ if (opt_idx >= 0)
+ options[opt_idx].def_val[VIM_DEFAULT] = ISP_LATIN1;
opt_idx = findoption((char_u *)"isk");
- options[opt_idx].def_val[VIM_DEFAULT] = ISK_LATIN1;
+ if (opt_idx >= 0)
+ options[opt_idx].def_val[VIM_DEFAULT] = ISK_LATIN1;
(void)init_chartab();
}
#endif
@@ -3297,8 +3314,11 @@ set_init_1()
if (p_tenc != NULL)
{
opt_idx = findoption((char_u *)"termencoding");
- options[opt_idx].def_val[VI_DEFAULT] = p_tenc;
- options[opt_idx].flags |= P_DEF_ALLOCED;
+ if (opt_idx >= 0)
+ {
+ options[opt_idx].def_val[VI_DEFAULT] = p_tenc;
+ options[opt_idx].flags |= P_DEF_ALLOCED;
+ }
convert_setup(&input_conv, p_tenc, p_enc);
convert_setup(&output_conv, p_enc, p_tenc);
}
@@ -3436,10 +3456,13 @@ set_string_default(name, val)
if (p != NULL) /* we don't want a NULL */
{
opt_idx = findoption((char_u *)name);
- if (options[opt_idx].flags & P_DEF_ALLOCED)
- vim_free(options[opt_idx].def_val[VI_DEFAULT]);
- options[opt_idx].def_val[VI_DEFAULT] = p;
- options[opt_idx].flags |= P_DEF_ALLOCED;
+ if (opt_idx >= 0)
+ {
+ if (options[opt_idx].flags & P_DEF_ALLOCED)
+ vim_free(options[opt_idx].def_val[VI_DEFAULT]);
+ options[opt_idx].def_val[VI_DEFAULT] = p;
+ options[opt_idx].flags |= P_DEF_ALLOCED;
+ }
}
}
@@ -3452,7 +3475,11 @@ set_number_default(name, val)
char *name;
long val;
{
- options[findoption((char_u *)name)].def_val[VI_DEFAULT] = (char_u *)val;
+ int opt_idx;
+
+ opt_idx = findoption((char_u *)name);
+ if (opt_idx >= 0)
+ options[opt_idx].def_val[VI_DEFAULT] = (char_u *)val;
}
#if defined(EXITFREE) || defined(PROTO)
@@ -3498,7 +3525,7 @@ set_init_2()
*/
set_number_default("scroll", (long)((long_u)Rows >> 1));
idx = findoption((char_u *)"scroll");
- if (!(options[idx].flags & P_WAS_SET))
+ if (idx >= 0 && !(options[idx].flags & P_WAS_SET))
set_option_default(idx, OPT_LOCAL, p_cp);
comp_col();
@@ -3507,7 +3534,7 @@ set_init_2()
* Default is Rows - 1.
*/
idx = findoption((char_u *)"wi");
- if (!(options[idx].flags & P_WAS_SET))
+ if (idx >= 0 && !(options[idx].flags & P_WAS_SET))
p_window = Rows - 1;
set_number_default("window", Rows - 1);
@@ -3519,7 +3546,8 @@ set_init_2()
* with a dark background, that can handle color.
*/
idx = findoption((char_u *)"bg");
- if (!(options[idx].flags & P_WAS_SET) && *term_bg_default() == 'd')
+ if (idx >= 0 && !(options[idx].flags & P_WAS_SET)
+ && *term_bg_default() == 'd')
{
set_string_option_direct(NULL, idx, (char_u *)"dark", OPT_FREE, 0);
/* don't mark it as set, when starting the GUI it may be
@@ -3594,10 +3622,16 @@ set_init_3()
#endif
idx_srr = findoption((char_u *)"srr");
- do_srr = !(options[idx_srr].flags & P_WAS_SET);
+ if (idx_srr < 0)
+ do_srr = FALSE;
+ else
+ do_srr = !(options[idx_srr].flags & P_WAS_SET);
#ifdef FEAT_QUICKFIX
idx_sp = findoption((char_u *)"sp");
- do_sp = !(options[idx_sp].flags & P_WAS_SET);
+ if (idx_sp < 0)
+ do_sp = FALSE;
+ else
+ do_sp = !(options[idx_sp].flags & P_WAS_SET);
#endif
/*
@@ -3692,7 +3726,7 @@ set_init_3()
int idx3;
idx3 = findoption((char_u *)"shcf");
- if (!(options[idx3].flags & P_WAS_SET))
+ if (idx3 >= 0 && !(options[idx3].flags & P_WAS_SET))
{
p_shcf = (char_u *)"-c";
options[idx3].def_val[VI_DEFAULT] = p_shcf;
@@ -3702,14 +3736,14 @@ set_init_3()
# ifdef WIN3264
/* Somehow Win32 requires the quotes around the redirection too */
idx3 = findoption((char_u *)"sxq");
- if (!(options[idx3].flags & P_WAS_SET))
+ if (idx3 >= 0 && !(options[idx3].flags & P_WAS_SET))
{
p_sxq = (char_u *)"\"";
options[idx3].def_val[VI_DEFAULT] = p_sxq;
}
# else
idx3 = findoption((char_u *)"shq");
- if (!(options[idx3].flags & P_WAS_SET))
+ if (idx3 >= 0 && !(options[idx3].flags & P_WAS_SET))
{
p_shq = (char_u *)"\"";
options[idx3].def_val[VI_DEFAULT] = p_shq;
@@ -3738,7 +3772,7 @@ set_helplang_default(lang)
if (lang == NULL || STRLEN(lang) < 2) /* safety check */
return;
idx = findoption((char_u *)"hlg");
- if (!(options[idx].flags & P_WAS_SET))
+ if (idx >= 0 && !(options[idx].flags & P_WAS_SET))
{
if (options[idx].flags & P_ALLOCED)
free_string_option(p_hlg);
@@ -3807,7 +3841,7 @@ set_title_defaults()
* not need to be contacted.
*/
idx1 = findoption((char_u *)"title");
- if (!(options[idx1].flags & P_WAS_SET))
+ if (idx1 >= 0 && !(options[idx1].flags & P_WAS_SET))
{
#ifdef FEAT_GUI
if (gui.starting || gui.in_use)
@@ -3819,7 +3853,7 @@ set_title_defaults()
p_title = val;
}
idx1 = findoption((char_u *)"icon");
- if (!(options[idx1].flags & P_WAS_SET))
+ if (idx1 >= 0 && !(options[idx1].flags & P_WAS_SET))
{
#ifdef FEAT_GUI
if (gui.starting || gui.in_use)
@@ -5224,7 +5258,7 @@ set_string_option_direct(name, opt_idx, val, opt_flags, set_sid)
if (opt_idx == -1) /* use name */
{
opt_idx = findoption(name);
- if (opt_idx == -1) /* not found (should not happen) */
+ if (opt_idx < 0) /* not found (should not happen) */
{
EMSG2(_(e_intern2), "set_string_option_direct()");
return;
@@ -8127,7 +8161,7 @@ set_option_value(name, number, string, opt_flags)
long_u flags;
opt_idx = findoption(name);
- if (opt_idx == -1)
+ if (opt_idx < 0)
EMSG2(_("E355: Unknown option: %s"), name);
else
{
@@ -9464,7 +9498,8 @@ reset_modifiable()
curbuf->b_p_ma = FALSE;
p_ma = FALSE;
opt_idx = findoption((char_u *)"ma");
- options[opt_idx].def_val[VI_DEFAULT] = FALSE;
+ if (opt_idx >= 0)
+ options[opt_idx].def_val[VI_DEFAULT] = FALSE;
}
/*
@@ -10297,12 +10332,16 @@ vimrc_found(fname, envname)
change_compatible(on)
int on;
{
+ int opt_idx;
+
if (p_cp != on)
{
p_cp = on;
compatible_set();
}
- options[findoption((char_u *)"cp")].flags |= P_WAS_SET;
+ opt_idx = findoption((char_u *)"cp");
+ if (opt_idx >= 0)
+ options[opt_idx].flags |= P_WAS_SET;
}
/*
diff --git a/src/po/de.po b/src/po/de.po
index eee8e2e778..046e2ea09e 100644
--- a/src/po/de.po
+++ b/src/po/de.po
@@ -4999,8 +4999,8 @@ msgid "E397: Filename required"
msgstr "E397: Dateiname wird benötigt"
#, c-format
-msgid "E747: Missing ']': %s"
-msgstr "E747: Fehlende ']': %s"
+msgid "E789: Missing ']': %s"
+msgstr "E789: Fehlende ']': %s"
#, c-format
msgid "E398: Missing '=': %s"
diff --git a/src/po/fr.po b/src/po/fr.po
index 3bf94baefc..f7bc9077af 100644
--- a/src/po/fr.po
+++ b/src/po/fr.po
@@ -71,8 +71,15 @@
# - Hundreds of error messages numbers added (wow)
# 2006-04-15 DB Vim 7.0 first draft, based on fr.po 7.0c03
# - 285 new messages.
+# 2006-05-17 DB VIM 7.0 second draft, still 7.0c03
+# - (check.vim) Fixed 2 wrong translated messages.
+# 2006-05-19 DB VIM 7.0 second draft, 7.0e02
+# - 15 new messages.
+# 2006-05-19 DB VIM 7.0, based on 7.0e03
+# - (check.vim) Fixed wrong messages.
+# - header comment of this file should be updated.
#
-# Translated: 1677/1677 (100.00%)
+# Translated: 1692/1692 (100.00%)
#
# Polishing done on:
# buffer.c
@@ -94,7 +101,7 @@ msgstr ""
"Project-Id-Version: Vim(Français)\n"
"Report-Msgid-Bugs-To: Adrien Beau <version.francaise@free.fr>\n"
"POT-Creation-Date: 2006-04-01 17:09+0200\n"
-"PO-Revision-Date: 2006-04-15 22:53+0200\n"
+"PO-Revision-Date: 2006-04-21 00:31+0200\n"
"Last-Translator: David Blanchet <david.blanchet@free.fr>\n"
"Language-Team: Adrien Beau <version.francaise@free.fr>\n"
"MIME-Version: 1.0\n"
@@ -110,7 +117,7 @@ msgstr "E82: Aucun tampon ne peut être alloué, Vim doit s'arrêter"
# explicite.
msgid "E83: Cannot allocate buffer, using other one..."
msgstr ""
-"E83: L'allocation du tampon a échoué: arrêtez Vim, libérez de la mémoire"
+"E83: L'allocation du tampon a échoué : arrêtez Vim, libérez de la mémoire"
msgid "E515: No buffers were unloaded"
msgstr "E515: Aucun tampon n'a été déchargé"
@@ -327,6 +334,9 @@ msgstr "E102: Le tampon %s est introuvable"
msgid "E103: Buffer \"%s\" is not in diff mode"
msgstr "E103: Le tampon %s n'est pas en mode diff"
+msgid "E787: Buffer changed unexpectedly"
+msgstr "E787: Le tampon a été modifié inopinément"
+
# AB - Je cherche une traduction plus concise pour "escape".
msgid "E104: Escape not allowed in digraph"
msgstr "E104: Un digraphe ne peut contenir le caractère d'échappement"
@@ -346,8 +356,8 @@ msgstr " Complètement de mot-clé (^N^P)"
# DB - todo : Faut-il une majuscule à "mode" ?
#. ctrl_x_mode == 0, ^P/^N compl.
-msgid " ^X mode (^]^D^E^F^I^K^L^N^O^P^S^U^V^Y)"
-msgstr " mode ^X (^]^D^E^F^I^K^L^N^O^P^S^U^V^Y)"
+msgid " ^X mode (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)"
+msgstr " mode ^X (^]^D^E^F^I^K^L^N^O^Ps^U^V^Y)"
msgid " Whole line completion (^L^N^P)"
msgstr " Complètement de ligne entière (^L^N^P)"
@@ -388,8 +398,8 @@ msgstr " Complètement défini par l'utilisateur (^U^N^P)"
msgid " Omni completion (^O^N^P)"
msgstr " Complètement selon le type de fichier (Omni) (^O^N^P)"
-msgid " Spelling suggestion (^S^N^P)"
-msgstr " Suggestion d'orthographe (^S^N^P)"
+msgid " Spelling suggestion (s^N^P)"
+msgstr " Suggestion d'orthographe (s^N^P)"
msgid " Keyword Local completion (^N^P)"