summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-04-06 20:18:50 +0000
committerBram Moolenaar <Bram@vim.org>2006-04-06 20:18:50 +0000
commit8dff818edfb61658b94128111234c3c074c1cadc (patch)
treeed09901efe925ec1b065c8dbd4cd94165b01cf6f /src
parent910f66f90c928da8b607ccfdc12fc33d9cb8d4a9 (diff)
downloadvim-git-8dff818edfb61658b94128111234c3c074c1cadc.tar.gz
updated for version 7.0c11
Diffstat (limited to 'src')
-rw-r--r--src/buffer.c4
-rw-r--r--src/ex_docmd.c4
-rw-r--r--src/feature.h9
-rw-r--r--src/normal.c12
-rw-r--r--src/option.c6
-rw-r--r--src/option.h2
-rw-r--r--src/po/en_GB.po246
-rw-r--r--src/screen.c6
-rw-r--r--src/spell.c226
-rw-r--r--src/version.h6
-rw-r--r--src/window.c14
11 files changed, 463 insertions, 72 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 15abab514..fbad67c99 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -434,7 +434,7 @@ close_buffer(win, buf, action)
if (usingNetbeans)
netbeans_file_closed(buf);
#endif
-#if defined(FEAT_NETBEANS_INTG) || defined(FEAT_SUN_WORKSHOP)
+#ifdef FEAT_AUTOCHDIR
/* Change directories when the acd option is set on. */
if (p_acd && curbuf->b_ffname != NULL
&& vim_chdirfile(curbuf->b_ffname) == OK)
@@ -1418,7 +1418,7 @@ enter_buffer(buf)
netbeans_file_activated(curbuf);
#endif
-#if defined(FEAT_NETBEANS_INTG) || defined(FEAT_SUN_WORKSHOP)
+#ifdef FEAT_AUTOCHDIR
/* Change directories when the acd option is set on. */
if (p_acd && curbuf->b_ffname != NULL
&& vim_chdirfile(curbuf->b_ffname) == OK)
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 0e0bcaec4..cff6d4ccb 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -7029,7 +7029,9 @@ ex_splitview(eap)
|| eap->cmdidx == CMD_tabfind
|| eap->cmdidx == CMD_tabnew)
{
- if (win_new_tabpage(cmdmod.tab) != FAIL)
+ if (win_new_tabpage(cmdmod.tab != 0 ? cmdmod.tab
+ : eap->addr_count == 0 ? 0
+ : (int)eap->line2 + 1) != FAIL)
{
do_exedit(eap, NULL);
diff --git a/src/feature.h b/src/feature.h
index 7d2f668ea..fdd7a295f 100644
--- a/src/feature.h
+++ b/src/feature.h
@@ -1246,3 +1246,12 @@
# define FEAT_FOOTER
#endif
+
+/*
+ * +autochdir 'autochdir' option.
+ */
+#if defined(FEAT_SUN_WORKSHOP) || defined(FEAT_NETBEANS_INTG) \
+ || defined(FEAT_BIG)
+# define FEAT_AUTOCHDIR
+#endif
+
diff --git a/src/normal.c b/src/normal.c
index e285b80df..bc6955d8a 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -5080,15 +5080,15 @@ handle_tabmenu()
break;
case TABLINE_MENU_NEW:
- if (current_tab > 0)
- goto_tabpage(current_tab);
- do_cmdline_cmd((char_u *)"tabnew");
+ vim_snprintf((char *)IObuff, IOSIZE, "%dtabnew",
+ current_tab > 0 ? current_tab - 1 : 999);
+ do_cmdline_cmd(IObuff);
break;
case TABLINE_MENU_OPEN:
- if (current_tab > 0)
- goto_tabpage(current_tab);
- do_cmdline_cmd((char_u *)"browse tabnew");
+ vim_snprintf((char *)IObuff, IOSIZE, "browse %dtabnew",
+ current_tab > 0 ? current_tab - 1 : 999);
+ do_cmdline_cmd(IObuff);
break;
}
}
diff --git a/src/option.c b/src/option.c
index 2f7e90ae2..f809a736d 100644
--- a/src/option.c
+++ b/src/option.c
@@ -521,7 +521,7 @@ static struct vimoption
{(char_u *)0L, (char_u *)0L}
#endif
},
-#if defined(FEAT_NETBEANS_INTG) || defined(FEAT_SUN_WORKSHOP)
+#ifdef FEAT_AUTOCHDIR
{"autochdir", "acd", P_BOOL|P_VI_DEF,
(char_u *)&p_acd, PV_NONE,
{(char_u *)FALSE, (char_u *)0L}},
@@ -7263,15 +7263,15 @@ set_bool_option(opt_idx, varp, value, opt_flags)
else
gui_mch_disable_beval_area(balloonEval);
}
+#endif
-# if defined(FEAT_NETBEANS_INTG) || defined(FEAT_SUN_WORKSHOP)
+#ifdef FEAT_AUTOCHDIR
else if ((int *)varp == &p_acd)
{
if (p_acd && curbuf->b_ffname != NULL
&& vim_chdirfile(curbuf->b_ffname) == OK)
shorten_fnames(TRUE);
}
-# endif
#endif
#ifdef FEAT_DIFF
diff --git a/src/option.h b/src/option.h
index 7bc952e31..afa189483 100644
--- a/src/option.h
+++ b/src/option.h
@@ -303,7 +303,7 @@
#ifdef FEAT_RIGHTLEFT
EXTERN long p_aleph; /* 'aleph' */
#endif
-#if defined(FEAT_NETBEANS_INTG) || defined(FEAT_SUN_WORKSHOP)
+#ifdef FEAT_AUTOCHDIR
EXTERN int p_acd; /* 'autochdir' */
#endif
#ifdef FEAT_MBYTE
diff --git a/src/po/en_GB.po b/src/po/en_GB.po
index 152092a54..e15b83500 100644
--- a/src/po/en_GB.po
+++ b/src/po/en_GB.po
@@ -5,10 +5,19 @@
#
# FIRST AUTHOR Mike Williams <mrw@eandem.co.uk>, 2003.
#
+# Style Guide:
+# o English spelling!
+# o -ise, not -ize.
+# o No contractions.
+# o Cannot, not can not.
+# o Backward (no s) when used as an adjective.
+# o TBC ...
+#
msgid ""
msgstr ""
"Project-Id-Version: Vim(UK English)\n"
-"POT-Creation-Date: 2003-02-23 10:27+0000\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-04-05 14:54+0100\n"
"PO-Revision-Date: 2003-02-25 11:05+0000\n"
"Last-Translator: Mike Williams <mrw@eandem.co.uk>\n"
"Language-Team: Mike Williams <mrw@eandem.co.uk>\n"
@@ -17,26 +26,248 @@ msgstr ""
"Content-Transfer-Encoding: 7bit\n"
#, c-format
+msgid "E96: Can not diff more than %ld buffers"
+msgstr "E96: Cannot diff more than %ld buffers"
+
+#, c-format
+msgid "E102: Can't find buffer \"%s\""
+msgstr "E102: Cannot find buffer \"%s\""
+
+#, c-format
+msgid "E738: Can't list variables for %s"
+msgstr "E738: Cannot list variables for %s"
+
+#, c-format
+msgid "E138: Can't write viminfo file %s!"
+msgstr "E138: Cannot write viminfo file %s!"
+
+msgid ""
+"# You may edit it if you're careful!\n"
+"\n"
+msgstr ""
+"# You may edit it if you are careful!\n"
+"\n"
+
+msgid "E146: Regular expressions can't be delimited by letters"
+msgstr "E146: Regular expressions cannot be delimited by letters"
+
+msgid "E493: Backwards range given"
+msgstr "E493: Backward range given"
+
+msgid "Backwards range given, OK to swap"
+msgstr "Backward range given, OK to swap"
+
+#, c-format
msgid "E185: Cannot find color scheme %s"
msgstr "E185: Cannot find colour scheme %s"
+msgid "Can't find temp file for conversion"
+msgstr "Cannot find temp file for conversion"
+
+msgid "can't read output of 'charconvert'"
+msgstr "cannot read output of 'charconvert'"
+
+msgid "E506: Can't write to backup file (add ! to override)"
+msgstr "E506: Cannot write to backup file (add ! to override)"
+
+msgid "E508: Can't read file for backup (add ! to override)"
+msgstr "E508: Cannot read file for backup (add ! to override)"
+
+msgid "E510: Can't make backup file (add ! to override)"
+msgstr "E510: Cannot make backup file (add ! to override)"
+
+msgid "E214: Can't find temp file for writing"
+msgstr "E214: Cannot find temp file for writing"
+
+msgid "E166: Can't open linked file for writing"
+msgstr "E166: Cannot open linked file for writing"
+
+msgid "E212: Can't open file for writing"
+msgstr "E212: Cannot open file for writing"
+
+msgid "E205: Patchmode: can't save original file"
+msgstr "E205: Patchmode: cannot save original file"
+
+msgid "E206: patchmode: can't touch empty original file"
+msgstr "E206: patchmode: cannot touch empty original file"
+
+msgid "E207: Can't delete backup file"
+msgstr "E207: Cannot delete backup file"
+
+msgid "E217: Can't execute autocommands for ALL events"
+msgstr "E217: Cannot execute autocommands for ALL events"
+
+#, c-format
+msgid "E482: Can't create file %s"
+msgstr "E482: Cannot create file %s"
+
+msgid "E483: Can't get temp file name"
+msgstr "E483: Cannot get temp file name"
+
+#, c-format
+msgid "E484: Can't open file %s"
+msgstr "E484: Cannot open file %s"
+
+#, c-format
+msgid "E485: Can't read file %s"
+msgstr "E485: Cannot read file %s"
+
+#, c-format
+msgid "E40: Can't open errorfile %s"
+msgstr "E40: Cannot open errorfile %s"
+
+msgid "E255: Couldn't read in sign data!"
+msgstr "E255: Could not read in sign data!"
+
#, c-format
msgid "E254: Cannot allocate color %s"
msgstr "E254: Cannot allocate colour %s"
+#, c-format
+msgid "E616: vim_SelFile: can't get font %s"
+msgstr "E616: vim_SelFile: cannot get font %s"
+
+msgid "E614: vim_SelFile: can't return to current directory"
+msgstr "E614: vim_SelFile: cannot return to current directory"
+
+msgid "E615: vim_SelFile: can't get current directory"
+msgstr "E615: vim_SelFile: cannot get current directory"
+
+#, c-format
+msgid "E610: Can't load Zap font '%s'"
+msgstr "E610: Cannot load Zap font '%s'"
+
+#, c-format
+msgid "E611: Can't use font %s"
+msgstr "E611: Cannot use font %s"
+
msgid "Vim E458: Cannot allocate colormap entry, some colors may be incorrect"
msgstr ""
"Vim E458: Cannot allocate colourmap entry, some colours may be incorrect"
+#, c-format
+msgid "E624: Can't open file \"%s\""
+msgstr "E624: Cannot open file \"%s\""
+
+#, c-format
+msgid "E457: Can't read PostScript resource file \"%s\""
+msgstr "E457: Cannot read PostScript resource file \"%s\""
+
+msgid "E324: Can't open PostScript output file"
+msgstr "E324: Cannot open PostScript output file"
+
+#, c-format
+msgid "E456: Can't open file \"%s\""
+msgstr "E456: Cannot open file \"%s\""
+
+msgid "E456: Can't find PostScript resource file \"prolog.ps\""
+msgstr "E456: Cannot find PostScript resource file \"prolog.ps\""
+
+msgid "E456: Can't find PostScript resource file \"cidfont.ps\""
+msgstr "E456: Cannot find PostScript resource file \"cidfont.ps\""
+
+#, c-format
+msgid "E456: Can't find PostScript resource file \"%s.ps\""
+msgstr "E456: Cannot find PostScript resource file \"%s.ps\""
+
+msgid "couldn't open buffer"
+msgstr "could not open buffer"
+
+msgid "can't delete OutputObject attributes"
+msgstr "cannot delete OutputObject attributes"
+
+msgid "--literal\t\tDon't expand wildcards"
+msgstr "--literal\t\tDo not expand wildcards"
+
+msgid "-f or --nofork\tForeground: Don't fork when starting GUI"
+msgstr "-f or --nofork\tForeground: Do not fork when starting GUI"
+
+msgid "-f\t\t\tDon't use newcli to open window"
+msgstr "-f\t\t\tDo not use newcli to open window"
+
+msgid "--noplugin\t\tDon't load plugin scripts"
+msgstr "--noplugin\t\tDo not load plugin scripts"
+
+msgid "--remote-silent <files> Same, don't complain if there is no server"
+msgstr "--remote-silent <files> Same, do not complain if there is no server"
+
+msgid ""
+"--remote-wait-silent <files> Same, don't complain if there is no server"
+msgstr ""
+"--remote-wait-silent <files> Same, do not complain if there is no server"
+
msgid "-background <color>\tUse <color> for the background (also: -bg)"
msgstr "-background <colour>\tUse <colour> for the background (also: -bg)"
msgid "-foreground <color>\tUse <color> for normal text (also: -fg)"
msgstr "-foreground <colour>\tUse <colour> for normal text (also: -fg)"
+msgid "+reverse\t\tDon't use reverse video (also: +rv)"
+msgstr "+reverse\t\tDo not use reverse video (also: +rv)"
+
+msgid "E288: input method doesn't support any style"
+msgstr "E288: input method does not support any style"
+
+msgid "E289: input method doesn't support my preedit type"
+msgstr "E289: input method does not support my preedit type"
+
+msgid "E298: Didn't get block nr 0?"
+msgstr "E298: Did not get block nr 0?"
+
+msgid "E298: Didn't get block nr 1?"
+msgstr "E298: Did not get block nr 1?"
+
+msgid "E298: Didn't get block nr 2?"
+msgstr "E298: Did not get block nr 2?"
+
+msgid "E304: ml_upd_block0(): Didn't get block 0??"
+msgstr "E304: ml_upd_block0(): Did not get block 0??"
+
msgid "Messages maintainer: Bram Moolenaar <Bram@vim.org>"
msgstr "Messages maintainer: Mike Williams <mrw@eandem.co.uk>"
+msgid "Keys don't match!"
+msgstr "Keys do not match!"
+
+#, c-format
+msgid "E344: Can't find directory \"%s\" in cdpath"
+msgstr "E344: Cannot find directory \"%s\" in cdpath"
+
+#, c-format
+msgid "E345: Can't find file \"%s\" in path"
+msgstr "E345: Cannot find file \"%s\" in path"
+
+msgid "E597: can't select fontset"
+msgstr "E597: cannot select fontset"
+
+msgid "E533: can't select wide font"
+msgstr "E533: cannot select wide font"
+
+msgid "VIM: Can't open window!\n"
+msgstr "VIM: Cannot open window!\n"
+
+msgid "E388: Couldn't find definition"
+msgstr "E388: Could not find definition"
+
+msgid "E389: Couldn't find pattern"
+msgstr "E389: Could not find pattern"
+
+#, c-format
+msgid "Unrecognized or duplicate item in %s line %d: %s"
+msgstr "Unrecognised or duplicate item in %s line %d: %s"
+
+#, c-format
+msgid "Unrecognized flags in %s line %d: %s"
+msgstr "Unrecognised flags in %s line %d: %s"
+
+#, c-format
+msgid "E781: .sug file doesn't match .spl file: %s"
+msgstr "E781: .sug file does not match .spl file: %s"
+
+#, c-format
+msgid "E394: Didn't find region item for %s"
+msgstr "E394: Did not find region item for %s"
+
msgid "E419: FG color unknown"
msgstr "E419: FG colour unknown"
@@ -46,3 +277,16 @@ msgstr "E420: BG colour unknown"
#, c-format
msgid "E421: Color name or number not recognized: %s"
msgstr "E421: Colour name or number not recognised: %s"
+
+msgid "E434: Can't find tag pattern"
+msgstr "E434: Cannot find tag pattern"
+
+msgid "E435: Couldn't find tag, just guessing!"
+msgstr "E435: Could not find tag, just guessing!"
+
+msgid "E442: Can't split topleft and botright at the same time"
+msgstr "E442: Cannot split topleft and botright at the same time"
+
+#, c-format
+msgid "E447: Can't find file \"%s\" in path"
+msgstr "E447: Cannot find file \"%s\" in path"
diff --git a/src/screen.c b/src/screen.c
index 52a6f743a..b82bd9831 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -4296,8 +4296,10 @@ win_line(wp, lnum, startrow, endrow, nochange)
v = wp->w_skipcol;
else
v = wp->w_leftcol;
- if (vcol < v + col) /* line ends before left margin */
- vcol = v + col;
+ /* check if line ends before left margin */
+ if (vcol < v + col - win_col_off(wp))
+
+ vcol = v + col - win_col_off(wp);
if (wp->w_p_cuc
&& (int)wp->w_virtcol >= vcol
&& (int)wp->w_virtcol < W_WIDTH(wp) * (row - startrow + 1)
diff --git a/src/spell.c b/src/spell.c
index a11372ab3..f74757002 100644
--- a/src/spell.c
+++ b/src/spell.c
@@ -4655,6 +4655,7 @@ typedef struct afffile_S
unsigned af_keepcase; /* KEEPCASE ID for keep-case word */
unsigned af_bad; /* BAD ID for banned word */
unsigned af_needaffix; /* NEEDAFFIX ID */
+ unsigned af_circumfix; /* CIRCUMFIX ID */
unsigned af_needcomp; /* NEEDCOMPOUND ID */
unsigned af_comproot; /* COMPOUNDROOT ID */
unsigned af_compforbid; /* COMPOUNDFORBIDFLAG ID */
@@ -4855,9 +4856,10 @@ static int sal_to_bool __ARGS((char_u *s));
static int has_non_ascii __ARGS((char_u *s));
static void spell_free_aff __ARGS((afffile_T *aff));
static int spell_read_dic __ARGS((spellinfo_T *spin, char_u *fname, afffile_T *affile));
+static int get_affix_flags __ARGS((afffile_T *affile, char_u *afflist));
static int get_pfxlist __ARGS((afffile_T *affile, char_u *afflist, char_u *store_afflist));
static void get_compflags __ARGS((afffile_T *affile, char_u *afflist, char_u *store_afflist));
-static int store_aff_word __ARGS((spellinfo_T *spin, char_u *word, char_u *afflist, afffile_T *affile, hashtab_T *ht, hashtab_T *xht, int comb, int flags, char_u *pfxlist, int pfxlen));
+static int store_aff_word __ARGS((spellinfo_T *spin, char_u *word, char_u *afflist, afffile_T *affile, hashtab_T *ht, hashtab_T *xht, int condit, int flags, char_u *pfxlist, int pfxlen));
static int spell_read_wordfile __ARGS((spellinfo_T *spin, char_u *fname));
static void *getroom __ARGS((spellinfo_T *spin, size_t len, int align));
static char_u *getroom_save __ARGS((spellinfo_T *spin, char_u *s));
@@ -4891,6 +4893,12 @@ static void init_spellfile __ARGS((void));
* Use a negative number with the lower 8 bits zero. */
#define PFX_FLAGS -256
+/* flags for "condit" argument of store_aff_word() */
+#define CONDIT_COMB 1 /* affix must combine */
+#define CONDIT_CFIX 2 /* affix must have CIRCUMFIX flag */
+#define CONDIT_SUF 4 /* add a suffix for matching flags */
+#define CONDIT_AFF 8 /* word already has an affix */
+
/*
* Tunable parameters for when the tree is compressed. See 'mkspellmem'.
*/
@@ -5170,6 +5178,7 @@ spell_read_aff(spin, fname)
|| aff->af_keepcase != 0
|| aff->af_bad != 0
|| aff->af_needaffix != 0
+ || aff->af_circumfix != 0
|| aff->af_needcomp != 0
|| aff->af_comproot != 0
|| aff->af_nosuggest != 0
@@ -5235,6 +5244,12 @@ spell_read_aff(spin, fname)
aff->af_needaffix = affitem2flag(aff->af_flagtype, items[1],
fname, lnum);
}
+ else if (STRCMP(items[0], "CIRCUMFIX") == 0 && itemcnt == 2
+ && aff->af_circumfix == 0)
+ {
+ aff->af_circumfix = affitem2flag(aff->af_flagtype, items[1],
+ fname, lnum);
+ }
else if (STRCMP(items[0], "NOSUGGEST") == 0 && itemcnt == 2
&& aff->af_nosuggest == 0)
{
@@ -5430,6 +5445,7 @@ spell_read_aff(spin, fname)
|| cur_aff->ah_flag == aff->af_rare
|| cur_aff->ah_flag == aff->af_keepcase
|| cur_aff->ah_flag == aff->af_needaffix
+ || cur_aff->ah_flag == aff->af_circumfix
|| cur_aff->ah_flag == aff->af_nosuggest
|| cur_aff->ah_flag == aff->af_needcomp
|| cur_aff->ah_flag == aff->af_comproot)
@@ -6449,29 +6465,12 @@ spell_read_dic(spin, fname, affile)
need_affix = FALSE;
if (afflist != NULL)
{
- /* Check for affix name that stands for keep-case word and stands
- * for rare word (if defined). */
- if (affile->af_keepcase != 0 && flag_in_afflist(
- affile->af_flagtype, afflist, affile->af_keepcase))
- flags |= WF_KEEPCAP | WF_FIXCAP;
- if (affile->af_rare != 0 && flag_in_afflist(
- affile->af_flagtype, afflist, affile->af_rare))
- flags |= WF_RARE;
- if (affile->af_bad != 0 && flag_in_afflist(
- affile->af_flagtype, afflist, affile->af_bad))
- flags |= WF_BANNED;
+ /* Extract flags from the affix list. */
+ flags |= get_affix_flags(affile, afflist);
+
if (affile->af_needaffix != 0 && flag_in_afflist(
affile->af_flagtype, afflist, affile->af_needaffix))
need_affix = TRUE;
- if (affile->af_needcomp != 0 && flag_in_afflist(
- affile->af_flagtype, afflist, affile->af_needcomp))
- flags |= WF_NEEDCOMP;
- if (affile->af_comproot != 0 && flag_in_afflist(
- affile->af_flagtype, afflist, affile->af_comproot))
- flags |= WF_COMPROOT;
- if (affile->af_nosuggest != 0 && flag_in_afflist(
- affile->af_flagtype, afflist, affile->af_nosuggest))
- flags |= WF_NOSUGGEST;
if (affile->af_pfxpostpone)
/* Need to store the list of prefix IDs with the word. */
@@ -6494,13 +6493,13 @@ spell_read_dic(spin, fname, affile)
* Additionally do matching prefixes that combine. */
if (store_aff_word(spin, dw, afflist, affile,
&affile->af_suff, &affile->af_pref,
- FALSE, flags, store_afflist, pfxlen) == FAIL)
+ CONDIT_SUF, flags, store_afflist, pfxlen) == FAIL)
retval = FAIL;
/* Find all matching prefixes and add the resulting words. */
if (store_aff_word(spin, dw, afflist, affile,
&affile->af_pref, NULL,
- FALSE, flags, store_afflist, pfxlen) == FAIL)
+ CONDIT_SUF, flags, store_afflist, pfxlen) == FAIL)
retval = FAIL;
}
}
@@ -6517,6 +6516,38 @@ spell_read_dic(spin, fname, affile)
}
/*
+ * Check for affix flags in "afflist" that are turned into word flags.
+ * Return WF_ flags.
+ */
+ static int
+get_affix_flags(affile, afflist)
+ afffile_T *affile;
+ char_u *afflist;
+{
+ int flags = 0;
+
+ if (affile->af_keepcase != 0 && flag_in_afflist(
+ affile->af_flagtype, afflist, affile->af_keepcase))
+ flags |= WF_KEEPCAP | WF_FIXCAP;
+ if (affile->af_rare != 0 && flag_in_afflist(
+ affile->af_flagtype, afflist, affile->af_rare))
+ flags |= WF_RARE;
+ if (affile->af_bad != 0 && flag_in_afflist(
+ affile->af_flagtype, afflist, affile->af_bad))
+ flags |= WF_BANNED;
+ if (affile->af_needcomp != 0 && flag_in_afflist(
+ affile->af_flagtype, afflist, affile->af_needcomp))
+ flags |= WF_NEEDCOMP;
+ if (affile->af_comproot != 0 && flag_in_afflist(
+ affile->af_flagtype, afflist, affile->af_comproot))
+ flags |= WF_COMPROOT;
+ if (affile->af_nosuggest != 0 && flag_in_afflist(
+ affile->af_flagtype, afflist, affile->af_nosuggest))
+ flags |= WF_NOSUGGEST;
+ return flags;
+}
+
+/*
* Get the list of prefix IDs from the affix list "afflist".
* Used for PFXPOSTPONE.
* Put the resulting flags in "store_afflist[MAXWLEN]" with a terminating NUL
@@ -6604,7 +6635,7 @@ get_compflags(affile, afflist, store_afflist)
* Returns FAIL when out of memory.
*/
static int
-store_aff_word(spin, word, afflist, affile, ht, xht, comb, flags,
+store_aff_word(spin, word, afflist, affile, ht, xht, condit, flags,
pfxlist, pfxlen)
spellinfo_T *spin; /* spell info */
char_u *word; /* basic word start */
@@ -6612,7 +6643,7 @@ store_aff_word(spin, word, afflist, affile, ht, xht, comb, flags,
afffile_T *affile;
hashtab_T *ht;
hashtab_T *xht;
- int comb; /* only use affixes that combine */
+ int condit; /* CONDIT_SUF et al. */
int flags; /* flags for the word */
char_u *pfxlist; /* list of prefix IDs */
int pfxlen; /* nr of flags in "pfxlist" for prefixes, rest
@@ -6625,12 +6656,16 @@ store_aff_word(spin, word, afflist, affile, ht, xht, comb, flags,
regmatch_T regmatch;
char_u newword[MAXWLEN];
int retval = OK;
- int i;
+ int i, j;
char_u *p;
int use_flags;
char_u *use_pfxlist;
+ int use_pfxlen;
+ int need_affix;
+ char_u store_afflist[MAXWLEN];
char_u pfx_pfxlist[MAXWLEN];
size_t wordlen = STRLEN(word);
+ int use_condit;
todo = ht->ht_used;
for (hi = ht->ht_array; todo > 0 && retval == OK; ++hi)
@@ -6642,8 +6677,9 @@ store_aff_word(spin, word, afflist, affile, ht, xht, comb, flags,
/* Check that the affix combines, if required, and that the word
* supports this affix. */
- if ((!comb || ah->ah_combine) && flag_in_afflist(
- affile->af_flagtype, afflist, ah->ah_flag))
+ if (((condit & CONDIT_COMB) == 0 || ah->ah_combine)
+ && flag_in_afflist(affile->af_flagtype, afflist,
+ ah->ah_flag))
{
/* Loop over all affix entries with this name. */
for (ae = ah->ah_first; ae != NULL; ae = ae->ae_next)
@@ -6654,7 +6690,10 @@ store_aff_word(spin, word, afflist, affile, ht, xht, comb, flags,
* Another requirement from Myspell is that the chop
* string is shorter than the word itself.
* For prefixes, when "PFXPOSTPONE" was used, only do
- * prefixes with a chop string and/or flags. */
+ * prefixes with a chop string and/or flags.
+ * When a previously added affix had CIRCUMFIX this one
+ * must have it too, if it had not then this one must not
+ * have one either. */
regmatch.regprog = ae->ae_prog;
regmatch.rm_ic = FALSE;
if ((xht != NULL || !affile->af_pfxpostpone
@@ -6663,7 +6702,12 @@ store_aff_word(spin, word, afflist, affile, ht, xht, comb, flags,
&& (ae->ae_chop == NULL
|| STRLEN(ae->ae_chop) < wordlen)
&& (ae->ae_prog == NULL
- || vim_regexec(&regmatch, word, (colnr_T)0)))
+ || vim_regexec(&regmatch, word, (colnr_T)0))
+ && (((condit & CONDIT_CFIX) == 0)
+ == ((condit & CONDIT_AFF) == 0
+ || ae->ae_flags == NULL
+ || !flag_in_afflist(affile->af_flagtype,
+ ae->ae_flags, affile->af_circumfix))))
{
/* Match. Remove the chop and add the affix. */
if (xht == NULL)
@@ -6707,27 +6751,88 @@ store_aff_word(spin, word, afflist, affile, ht, xht, comb, flags,
STRCAT(newword, ae->ae_add);
}
- /* Obey the "rare" flag of the affix. */
- if (affile->af_rare != 0
- && ae->ae_flags != NULL
- && flag_in_afflist(
- affile->af_flagtype, ae->ae_flags,
- affile->af_rare))
- use_flags = flags | WF_RARE;
- else
- use_flags = flags;
+ use_flags = flags;
+ use_pfxlist = pfxlist;
+ use_pfxlen = pfxlen;
+ need_affix = FALSE;
+ use_condit = condit | CONDIT_COMB | CONDIT_AFF;
+ if (ae->ae_flags != NULL)
+ {
+ /* Extract flags from the affix list. */
+ use_flags |= get_affix_flags(affile, ae->ae_flags);
+
+ if (affile->af_needaffix != 0 && flag_in_afflist(
+ affile->af_flagtype, ae->ae_flags,
+ affile->af_needaffix))
+ need_affix = TRUE;
+
+ /* When there is a CIRCUMFIX flag the other affix
+ * must also have it and we don't add the word
+ * with one affix. */
+ if (affile->af_circumfix != 0 && flag_in_afflist(
+ affile->af_flagtype, ae->ae_flags,
+ affile->af_circumfix))
+ {
+ use_condit |= CONDIT_CFIX;
+ if ((condit & CONDIT_CFIX) == 0)
+ need_affix = TRUE;
+ }
+
+ if (affile->af_pfxpostpone
+ || spin->si_compflags != NULL)
+ {
+ if (affile->af_pfxpostpone)
+ /* Get prefix IDS from the affix list. */
+ use_pfxlen = get_pfxlist(affile,
+ ae->ae_flags, store_afflist);
+ else
+ use_pfxlen = 0;
+ use_pfxlist = store_afflist;
+
+ /* Combine the prefix IDs. Avoid adding the
+ * same ID twice. */
+ for (i = 0; i < pfxlen; ++i)
+ {
+ for (j = 0; j < use_pfxlen; ++j)
+ if (pfxlist[i] == use_pfxlist[j])
+ break;
+ if (j == use_pfxlen)
+ use_pfxlist[use_pfxlen++] = pfxlist[i];
+ }
+
+ if (spin->si_compflags != NULL)
+ /* Get compound IDS from the affix list. */
+ get_compflags(affile, ae->ae_flags,
+ use_pfxlist + use_pfxlen);
+
+ /* Combine the list of compound flags.
+ * Concatenate them to the prefix IDs list.
+ * Avoid adding the same ID twice. */
+ for (i = pfxlen; pfxlist[i] != NUL; ++i)
+ {
+ for (j = use_pfxlen;
+ use_pfxlist[j] != NUL; ++j)
+ if (pfxlist[i] == use_pfxlist[j])
+ break;
+ if (use_pfxlist[j] == NUL)
+ {
+ use_pfxlist[j++] = pfxlist[i];
+ use_pfxlist[j] = NUL;
+ }
+ }
+ }
+ }
/* Obey a "COMPOUNDFORBIDFLAG" of the affix: don't
* use the compound flags. */
- use_pfxlist = pfxlist;
- if (pfxlist != NULL
+ if (use_pfxlist != NULL
&& affile->af_compforbid != 0
&& ae->ae_flags != NULL
&& flag_in_afflist(
affile->af_flagtype, ae->ae_flags,
affile->af_compforbid))
{
- vim_strncpy(pfx_pfxlist, pfxlist, pfxlen);
+ vim_strncpy(pfx_pfxlist, use_pfxlist, use_pfxlen);
use_pfxlist = pfx_pfxlist;
}
@@ -6741,8 +6846,9 @@ store_aff_word(spin, word, afflist, affile, ht, xht, comb, flags,
/* ... don't use a prefix list if combining
* affixes is not allowed. But do use the
* compound flags after them. */
- if ((!ah->ah_combine || comb) && pfxlist != NULL)
- use_pfxlist += pfxlen;
+ if ((!ah->ah_combine || (condit & CONDIT_COMB))
+ && use_pfxlist != NULL)
+ use_pfxlist += use_pfxlen;
}
/* When compounding is supported and there is no
@@ -6763,16 +6869,38 @@ store_aff_word(spin, word, afflist, affile, ht, xht, comb, flags,
/* Store the modified word. */
if (store_word(spin, newword, use_flags,
- spin->si_region, use_pfxlist, FALSE) == FAIL)
+ spin->si_region, use_pfxlist,
+ need_affix) == FAIL)
retval = FAIL;
+ /* When added a prefix or a first suffix and the affix
+ * has flags may add a(nother) suffix. RECURSIVE! */
+ if ((condit & CONDIT_SUF) && ae->ae_flags != NULL)
+ if (store_aff_word(spin, newword, ae->ae_flags,
+ affile, &affile->af_suff, xht,
+ use_condit & (xht == NULL
+ ? ~0 : ~CONDIT_SUF),
+ use_flags, use_pfxlist, pfxlen) == FAIL)
+ retval = FAIL;
+
/* When added a suffix and combining is allowed also
- * try adding prefixes additionally. RECURSIVE! */
+ * try adding a prefix additionally. Both for the
+ * word flags and for the affix flags. RECURSIVE! */
if (xht != NULL && ah->ah_combine)
- if (store_aff_word(spin, newword, afflist, affile,
- xht, NULL, TRUE,
- use_flags, use_pfxlist, pfxlen) == FAIL)
+ {
+ if (store_aff_word(spin, newword,
+ afflist, affile,
+ xht, NULL, use_condit,
+ use_flags, use_pfxlist,
+ pfxlen) == FAIL
+ || (ae->ae_flags != NULL
+ && store_aff_word(spin, newword,
+ ae->ae_flags, affile,
+ xht, NULL, use_condit,
+ use_flags, use_pfxlist,
+ pfxlen) == FAIL))
retval = FAIL;
+ }
}
}
}
diff --git a/src/version.h b/src/version.h
index 7cd5ea497..e3bccb55c 100644
--- a/src/version.h
+++ b/src/version.h
@@ -35,6 +35,6 @@
*/
#define VIM_VERSION_NODOT "vim70c"
#define VIM_VERSION_SHORT "7.0c"
-#define VIM_VERSION_MEDIUM "7.0c10 BETA"
-#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0c10 BETA (2006 Apr 5)"
-#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0c10 BETA (2006 Apr 5, compiled "
+#define VIM_VERSION_MEDIUM "7.0c11 BETA"
+#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0c11 BETA (2006 Apr 6)"
+#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0c11 BETA (2006 Apr 6, compiled "
diff --git a/src/window.c b/src/window.c
index 677dcbec0..26003f37a 100644
--- a/src/window.c
+++ b/src/window.c
@@ -482,14 +482,15 @@ newwindow:
case 'f':
case 'F':
case Ctrl_F:
+wingotofile:
CHECK_CMDWIN
ptr = grab_file_name(Prenum1, &lnum);
if (ptr != NULL)
{
-#ifdef FEAT_GUI
+# ifdef FEAT_GUI
need_mouse_correct = TRUE;
-#endif
+# endif
setpcmark();
if (win_split(0, 0) == OK)
{
@@ -592,6 +593,11 @@ newwindow:
do_nv_ident('g', xchar);
break;
+#ifdef FEAT_SEARCHPATH
+ case 'f': /* CTRL-W gf: "gf" in a new tab page */
+ cmdmod.tab = TRUE;
+ goto wingotofile;
+#endif
default:
beep_flush();
break;
@@ -3879,8 +3885,8 @@ win_enter_ext(wp, undo_sync, curwin_invalid)
setmouse(); /* in case jumped to/from help buffer */
#endif
-#if defined(FEAT_NETBEANS_INTG) || defined(FEAT_SUN_WORKSHOP)
- /* Change directories when the acd option is set on and after
+#ifdef FEAT_AUTOCHDIR
+ /* Change directories when the 'acd' option is set on and after
* switching windows. */
if (p_acd && curbuf->b_ffname != NULL
&& vim_chdirfile(curbuf->b_ffname) == OK)