• R/O
  • SSH

vim: コミット

Mirror of the Vim source from https://github.com/vim/vim


コミットメタ情報

リビジョン5b101ff9d4c43c566e7adfb0a7c0978d2150d741 (tree)
日時2006-02-22 07:12:05
作者vimboss
コミッターvimboss

ログメッセージ

updated for version 7.0203

変更サマリ

差分

diff -r e629de7618da -r 5b101ff9d4c4 runtime/doc/options.txt
--- a/runtime/doc/options.txt Tue Feb 21 22:04:51 2006 +0000
+++ b/runtime/doc/options.txt Tue Feb 21 22:12:05 2006 +0000
@@ -1,4 +1,4 @@
1-*options.txt* For Vim version 7.0aa. Last change: 2006 Feb 20
1+*options.txt* For Vim version 7.0aa. Last change: 2006 Feb 21
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -6002,6 +6002,14 @@
60026002 All fields except the {item} is optional. A single percent sign can
60036003 be given as "%%". Up to 80 items can be specified.
60046004
6005+ When the option starts with "%!" then it is used as an expression,
6006+ evaluated and the result is used as the option value. Example: >
6007+ :set statusline=%!MyStatusLine()
6008+< The result can contain %{} items that will be evaluated too.
6009+
6010+ When there is error while evaluating the option then it will be made
6011+ empty to avoid further errors. Otherwise screen updating would loop.
6012+
60056013 Note that the only effect of 'ruler' when this option is set (and
60066014 'laststatus' is 2) is controlling the output of |CTRL-G|.
60076015
@@ -6060,7 +6068,7 @@
60606068 percentage described for 'ruler'. Always 3 in length.
60616069 a S Argument list status as in default title. ({current} of {max})
60626070 Empty if the argument file count is zero or one.
6063- { NF Evaluate expression between '{' and '}' and substitute result.
6071+ { NF Evaluate expression between '%{' and '}' and substitute result.
60646072 Note that there is no '%' before the closing '}'.
60656073 ( - Start of item group. Can be used for setting the width and
60666074 alignment of a section. Must be followed by %) somewhere.
@@ -6069,6 +6077,10 @@
60696077 No width fields allowed.
60706078 = - Separation point between left and right aligned items.
60716079 No width fields allowed.
6080+ # - Set highlight group. The name must follow and then a # again.
6081+ Thus use %#HLname# for highlight group HLname. The same
6082+ highlighting is used, also for the statusline of non-current
6083+ windows.
60726084 * - Set highlight group to User{N}, where {N} is taken from the
60736085 minwid field, e.g. %1*. Restore normal highlight with %* or %0*.
60746086 The difference between User{N} and StatusLine will be applied
@@ -6264,7 +6276,7 @@
62646276
62656277 The value is evaluated like with 'statusline'. You can use
62666278 |tabpagenr()|, |tabpagewinnr()| and |tabpagebuflist()| to figure out
6267- the text to be displayed.
6279+ the text to be displayed. See |setting-tabline| for more info.
62686280
62696281 Keep in mind that only one of the tab pages is the current one, others
62706282 are invisible and you can't jump to their windows.
diff -r e629de7618da -r 5b101ff9d4c4 runtime/doc/tags
--- a/runtime/doc/tags Tue Feb 21 22:04:51 2006 +0000
+++ b/runtime/doc/tags Tue Feb 21 22:12:05 2006 +0000
@@ -6582,6 +6582,7 @@
65826582 setqflist() eval.txt /*setqflist()*
65836583 setreg() eval.txt /*setreg()*
65846584 setting-guifont gui.txt /*setting-guifont*
6585+setting-tabline tabpage.txt /*setting-tabline*
65856586 setwinvar() eval.txt /*setwinvar()*
65866587 sftp pi_netrw.txt /*sftp*
65876588 sgml.vim syntax.txt /*sgml.vim*
diff -r e629de7618da -r 5b101ff9d4c4 runtime/doc/todo.txt
--- a/runtime/doc/todo.txt Tue Feb 21 22:04:51 2006 +0000
+++ b/runtime/doc/todo.txt Tue Feb 21 22:12:05 2006 +0000
@@ -1,4 +1,4 @@
1-*todo.txt* For Vim version 7.0aa. Last change: 2006 Feb 20
1+*todo.txt* For Vim version 7.0aa. Last change: 2006 Feb 21
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -30,7 +30,10 @@
3030 *known-bugs*
3131 -------------------- Known bugs and current work -----------------------
3232
33-'tabline' documentation with an example; esp for the highlighting
33+Remove resetting "bold" from screen_start_highlight()?
34+
35+Using 'tabline' breaks using mouse to select a tab. How to do that?
36+See suggestion from Tony Mechelynck.
3437
3538 P_INSECURE should be remembered for local option values separately.
3639
@@ -63,6 +66,7 @@
6366 ":tab!" to open it at the end, ":0tab" to open at the start.
6467 ":tab split" opens tab with window same as current window.
6568 ":tpsplit" would split the tab with all its windows.
69+In GUI: right click can popup menu to close a specific tab.
6670 Option to put tab line at the left or right? Need an option to specify its
6771 witdh. It's like a separate window with ":tabs" output.
6872 :tabdo ":tabdo windo cmd" should also work
@@ -85,6 +89,8 @@
8589
8690 Crash with X command server (Ciaran McCreesh).
8791
92+"dip" in end empty lines at end of file leaves one line. (Matt Mzyzik)
93+
8894 Ctags still hasn't included the patch. Darren is looking for someone to do
8995 maintanance.
9096
diff -r e629de7618da -r 5b101ff9d4c4 runtime/doc/version7.txt
--- a/runtime/doc/version7.txt Tue Feb 21 22:04:51 2006 +0000
+++ b/runtime/doc/version7.txt Tue Feb 21 22:12:05 2006 +0000
@@ -1,4 +1,4 @@
1-*version7.txt* For Vim version 7.0aa. Last change: 2006 Feb 18
1+*version7.txt* For Vim version 7.0aa. Last change: 2006 Feb 21
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -654,6 +654,8 @@
654654
655655 Sinhala (Sri Lanka) (Harshula Jayasuriya)
656656
657+Tamil in TSCII encoding (Yegappan Lakshmanan)
658+
657659
658660 New message translations: ~
659661
@@ -1016,6 +1018,12 @@
10161018 The colortest.vim script can now be invoked directly with ":source" or
10171019 ":runtime".
10181020
1021+The 'statusline' option and other options that support the same format can now
1022+use these new features:
1023+- When it starts with "%!" the value is first evaluated as an expression
1024+ before parsing the value.
1025+- "%#HLname#" can be used to start highlighting with HLname.
1026+
10191027 ==============================================================================
10201028 COMPILE TIME CHANGES *compile-changes-7*
10211029
@@ -1710,4 +1718,8 @@
17101718 Motif: In diff mode dragging one scrollbar didn't update the scrollbar of the
17111719 other diff'ed window.
17121720
1721+When editing in an xterm with a different number of colors than expected the
1722+screen would be cleared and redrawn, causing the message about the edited file
1723+to be cleared. Now set "keep_msg" to redraw the last message.
1724+
17131725 vim:tw=78:ts=8:ft=help:norl:
diff -r e629de7618da -r 5b101ff9d4c4 runtime/syntax/mgl.vim
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/runtime/syntax/mgl.vim Tue Feb 21 22:12:05 2006 +0000
@@ -0,0 +1,128 @@
1+" Vim syntax file
2+" Language: MGL
3+" Version: 1.0
4+" Last Change: 2006 Feb 21
5+" Maintainer: Gero Kuhlmann <gero@gkminix.han.de>
6+"
7+" $Id$
8+"
9+if version < 600
10+ syntax clear
11+elseif exists("b:current_syntax")
12+ finish
13+endif
14+
15+
16+syn sync lines=250
17+
18+syn keyword mglBoolean true false
19+syn keyword mglConditional if else then
20+syn keyword mglConstant nil
21+syn keyword mglPredefined maxint
22+syn keyword mglLabel case goto label
23+syn keyword mglOperator to downto in of with
24+syn keyword mglOperator and not or xor div mod
25+syn keyword mglRepeat do for repeat while to until
26+syn keyword mglStatement procedure function break continue return restart
27+syn keyword mglStatement program begin end const var type
28+syn keyword mglStruct record
29+syn keyword mglType integer string char boolean char ipaddr array
30+
31+
32+" String
33+if !exists("mgl_one_line_string")
34+ syn region mglString matchgroup=mglString start=+'+ end=+'+ contains=mglStringEscape
35+ syn region mglString matchgroup=mglString start=+"+ end=+"+ contains=mglStringEscapeGPC
36+else
37+ "wrong strings
38+ syn region mglStringError matchgroup=mglStringError start=+'+ end=+'+ end=+$+ contains=mglStringEscape
39+ syn region mglStringError matchgroup=mglStringError start=+"+ end=+"+ end=+$+ contains=mglStringEscapeGPC
40+ "right strings
41+ syn region mglString matchgroup=mglString start=+'+ end=+'+ oneline contains=mglStringEscape
42+ syn region mglString matchgroup=mglString start=+"+ end=+"+ oneline contains=mglStringEscapeGPC
43+end
44+syn match mglStringEscape contained "''"
45+syn match mglStringEscapeGPC contained '""'
46+
47+
48+if exists("mgl_symbol_operator")
49+ syn match mglSymbolOperator "[+\-/*=\%]"
50+ syn match mglSymbolOperator "[<>]=\="
51+ syn match mglSymbolOperator "<>"
52+ syn match mglSymbolOperator ":="
53+ syn match mglSymbolOperator "[()]"
54+ syn match mglSymbolOperator "\.\."
55+ syn match mglMatrixDelimiter "(."
56+ syn match mglMatrixDelimiter ".)"
57+ syn match mglMatrixDelimiter "[][]"
58+endif
59+
60+syn match mglNumber "-\=\<\d\+\>"
61+syn match mglHexNumber "\$[0-9a-fA-F]\+\>"
62+syn match mglCharacter "\#[0-9]\+\>"
63+syn match mglIpAddr "[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\>"
64+
65+syn region mglComment start="(\*" end="\*)"
66+syn region mglComment start="{" end="}"
67+syn region mglComment start="//" end="$"
68+
69+if !exists("mgl_no_functions")
70+ syn keyword mglFunction dispose new
71+ syn keyword mglFunction get load print select
72+ syn keyword mglFunction odd pred succ
73+ syn keyword mglFunction chr ord abs sqr
74+ syn keyword mglFunction exit
75+ syn keyword mglOperator at timeout
76+endif
77+
78+
79+syn region mglPreProc start="(\*\$" end="\*)"
80+syn region mglPreProc start="{\$" end="}"
81+
82+syn keyword mglException try except raise
83+syn keyword mglPredefined exception
84+
85+
86+" Define the default highlighting.
87+" For version 5.7 and earlier: only when not done already
88+" For version 5.8 and later: only when an item doesn't have highlighting yet
89+if version >= 508 || !exists("did_mgl_syn_inits")
90+ if version < 508
91+ let did_mgl_syn_inits = 1
92+ command -nargs=+ HiLink hi link <args>
93+ else
94+ command -nargs=+ HiLink hi def link <args>
95+ endif
96+
97+ HiLink mglBoolean Boolean
98+ HiLink mglComment Comment
99+ HiLink mglConditional Conditional
100+ HiLink mglConstant Constant
101+ HiLink mglException Exception
102+ HiLink mglFunction Function
103+ HiLink mglLabel Label
104+ HiLink mglMatrixDelimiter Identifier
105+ HiLink mglNumber Number
106+ HiLink mglHexNumber Number
107+ HiLink mglCharacter Number
108+ HiLink mglIpAddr Number
109+ HiLink mglOperator Operator
110+ HiLink mglPredefined mglFunction
111+ HiLink mglPreProc PreProc
112+ HiLink mglRepeat Repeat
113+ HiLink mglStatement Statement
114+ HiLink mglString String
115+ HiLink mglStringEscape Special
116+ HiLink mglStringEscapeGPC Special
117+ HiLink mglStringError Error
118+ HiLink mglStruct mglStatement
119+ HiLink mglSymbolOperator mglOperator
120+ HiLink mglType Type
121+
122+ delcommand HiLink
123+endif
124+
125+
126+let b:current_syntax = "mgl"
127+
128+" vim: ts=8 sw=2
diff -r e629de7618da -r 5b101ff9d4c4 src/eval.c
--- a/src/eval.c Tue Feb 21 22:04:51 2006 +0000
+++ b/src/eval.c Tue Feb 21 22:12:05 2006 +0000
@@ -14895,7 +14895,7 @@
1489514895 {
1489614896 tp = find_tabpage((int)get_tv_number(&argvars[0]));
1489714897 if (tp != NULL)
14898- wp = tp->tp_firstwin;
14898+ wp = (tp == curtab) ? firstwin : tp->tp_firstwin;
1489914899 }
1490014900 if (wp == NULL)
1490114901 rettv->vval.v_number = 0;
diff -r e629de7618da -r 5b101ff9d4c4 src/ex_cmds.c
--- a/src/ex_cmds.c Tue Feb 21 22:04:51 2006 +0000
+++ b/src/ex_cmds.c Tue Feb 21 22:12:05 2006 +0000
@@ -1212,11 +1212,8 @@
12121212 vim_snprintf((char *)msg_buf, sizeof(msg_buf),
12131213 _("%ld lines filtered"), (long)linecount);
12141214 if (msg(msg_buf) && !msg_scroll)
1215- {
12161215 /* save message to display it after redraw */
1217- set_keep_msg(msg_buf);
1218- keep_msg_attr = 0;
1219- }
1216+ set_keep_msg(msg_buf, 0);
12201217 }
12211218 else
12221219 msgmore((long)linecount);
@@ -4910,11 +4907,8 @@
49104907 vim_snprintf((char *)msg_buf + len, sizeof(msg_buf) - len,
49114908 _(" on %ld lines"), (long)sub_nlines);
49124909 if (msg(msg_buf))
4913- {
49144910 /* save message to display it after redraw */
4915- set_keep_msg(msg_buf);
4916- keep_msg_attr = 0;
4917- }
4911+ set_keep_msg(msg_buf, 0);
49184912 return TRUE;
49194913 }
49204914 if (got_int)
diff -r e629de7618da -r 5b101ff9d4c4 src/globals.h
--- a/src/globals.h Tue Feb 21 22:04:51 2006 +0000
+++ b/src/globals.h Tue Feb 21 22:12:05 2006 +0000
@@ -488,7 +488,7 @@
488488 # define FOR_ALL_WINDOWS(wp) for (wp = firstwin; wp != NULL; wp = wp->w_next)
489489 #define FOR_ALL_TAB_WINDOWS(tp, wp) \
490490 for ((tp) = first_tabpage; (tp) != NULL; (tp) = (tp)->tp_next) \
491- for ((wp) = ((tp)->tp_topframe == topframe) \
491+ for ((wp) = ((tp) == curtab) \
492492 ? firstwin : (tp)->tp_firstwin; (wp); (wp) = (wp)->w_next)
493493 #else
494494 # define firstwin curwin
@@ -1446,7 +1446,10 @@
14461446 EXTERN char_u e_guarded[] INIT(= N_("E463: Region is guarded, cannot modify"));
14471447 EXTERN char_u e_nbreadonly[] INIT(= N_("E744: NetBeans does not allow changes in read-only files"));
14481448 #endif
1449+#if defined(FEAT_INS_EXPAND) || defined(FEAT_EVAL) || defined(FEAT_SYN_HL) \
1450+ || defined(FEAT_WINDOWS)
14491451 EXTERN char_u e_intern2[] INIT(= N_("E685: Internal error: %s"));
1452+#endif
14501453 EXTERN char_u e_maxmempat[] INIT(= N_("E363: pattern uses more memory than 'maxmempattern'"));
14511454 EXTERN char_u e_emptybuf[] INIT(= N_("E749: empty buffer"));
14521455
diff -r e629de7618da -r 5b101ff9d4c4 src/gui_beval.c
--- a/src/gui_beval.c Tue Feb 21 22:04:51 2006 +0000
+++ b/src/gui_beval.c Tue Feb 21 22:12:05 2006 +0000
@@ -103,7 +103,11 @@
103103 # else
104104 /* Assume Athena */
105105 # include <X11/Shell.h>
106-# include <X11/Xaw/Label.h>
106+# ifdef FEAT_GUI_NEXTAW
107+# include <X11/neXtaw/Label.h>
108+# else
109+# include <X11/Xaw/Label.h>
110+# endif
107111 # endif
108112 #endif
109113
diff -r e629de7618da -r 5b101ff9d4c4 src/main.c
--- a/src/main.c Tue Feb 21 22:04:51 2006 +0000
+++ b/src/main.c Tue Feb 21 22:12:05 2006 +0000
@@ -1059,6 +1059,7 @@
10591059 /* msg_attr_keep() will set keep_msg to NULL, must free the
10601060 * string here. */
10611061 p = keep_msg;
1062+ keep_msg = NULL;
10621063 msg_attr(p, keep_msg_attr);
10631064 vim_free(p);
10641065 }
@@ -1169,7 +1170,7 @@
11691170 for (tp = first_tabpage; tp != NULL; tp = next_tp)
11701171 {
11711172 next_tp = tp->tp_next;
1172- for (wp = (tp->tp_topframe == topframe)
1173+ for (wp = (tp == curtab)
11731174 ? firstwin : tp->tp_firstwin; wp != NULL; wp = wp->w_next)
11741175 {
11751176 buf = wp->w_buffer;
diff -r e629de7618da -r 5b101ff9d4c4 src/memline.c
--- a/src/memline.c Tue Feb 21 22:04:51 2006 +0000
+++ b/src/memline.c Tue Feb 21 22:12:05 2006 +0000
@@ -2740,10 +2740,8 @@
27402740 && !netbeansSuppressNoLines
27412741 #endif
27422742 )
2743- {
2744- set_keep_msg((char_u *)_(no_lines_msg));
2745- keep_msg_attr = 0;
2746- }
2743+ set_keep_msg((char_u *)_(no_lines_msg), 0);
2744+
27472745 /* FEAT_BYTEOFF already handled in there, dont worry 'bout it below */
27482746 i = ml_replace((linenr_T)1, (char_u *)"", TRUE);
27492747 buf->b_ml.ml_flags |= ML_EMPTY;
diff -r e629de7618da -r 5b101ff9d4c4 src/misc1.c
--- a/src/misc1.c Tue Feb 21 22:04:51 2006 +0000
+++ b/src/misc1.c Tue Feb 21 22:12:05 2006 +0000
@@ -3241,8 +3241,7 @@
32413241 STRCAT(msg_buf, _(" (Interrupted)"));
32423242 if (msg(msg_buf))
32433243 {
3244- set_keep_msg(msg_buf);
3245- keep_msg_attr = 0;
3244+ set_keep_msg(msg_buf, 0);
32463245 keep_msg_more = TRUE;
32473246 }
32483247 }
diff -r e629de7618da -r 5b101ff9d4c4 src/misc2.c
--- a/src/misc2.c Tue Feb 21 22:04:51 2006 +0000
+++ b/src/misc2.c Tue Feb 21 22:12:05 2006 +0000
@@ -1026,7 +1026,7 @@
10261026 vim_free(clip_exclude_prog);
10271027 vim_free(last_cmdline);
10281028 vim_free(new_last_cmdline);
1029- set_keep_msg(NULL);
1029+ set_keep_msg(NULL, 0);
10301030 vim_free(ff_expand_buffer);
10311031
10321032 /* Clear cmdline history. */
diff -r e629de7618da -r 5b101ff9d4c4 src/option.c
--- a/src/option.c Tue Feb 21 22:04:51 2006 +0000
+++ b/src/option.c Tue Feb 21 22:12:05 2006 +0000
@@ -6524,7 +6524,7 @@
65246524 s++;
65256525 while (VIM_ISDIGIT(*s))
65266526 s++;
6527- if (*s == STL_HIGHLIGHT)
6527+ if (*s == STL_USER_HL)
65286528 continue;
65296529 if (*s == '.')
65306530 {
diff -r e629de7618da -r 5b101ff9d4c4 src/option.h
--- a/src/option.h Tue Feb 21 22:04:51 2006 +0000
+++ b/src/option.h Tue Feb 21 22:12:05 2006 +0000
@@ -286,8 +286,9 @@
286286 #define STL_VIM_EXPR '{' /* start of expression to substitute */
287287 #define STL_MIDDLEMARK '=' /* separation between left and right */
288288 #define STL_TRUNCMARK '<' /* truncation mark if line is too long*/
289-#define STL_HIGHLIGHT '*' /* highlight from (User)1..9 or 0 */
290-#define STL_ALL ((char_u *) "fFtcvVlLknoObBrRhHmYyWwMpPaN{")
289+#define STL_USER_HL '*' /* highlight from (User)1..9 or 0 */
290+#define STL_HIGHLIGHT '#' /* highlight name */
291+#define STL_ALL ((char_u *) "fFtcvVlLknoObBrRhHmYyWwMpPaN{#")
291292
292293 /* flags used for parsed 'wildmode' */
293294 #define WIM_FULL 1
diff -r e629de7618da -r 5b101ff9d4c4 src/screen.c
--- a/src/screen.c Tue Feb 21 22:04:51 2006 +0000
+++ b/src/screen.c Tue Feb 21 22:12:05 2006 +0000
@@ -146,6 +146,9 @@
146146 #ifdef FEAT_VERTSPLIT
147147 static void draw_vsep_win __ARGS((win_T *wp, int row));
148148 #endif
149+#ifdef FEAT_STL_OPT
150+static void redraw_custum_statusline __ARGS((win_T *wp));
151+#endif
149152 #ifdef FEAT_SEARCH_EXTRA
150153 static void start_search_hl __ARGS((void));
151154 static void end_search_hl __ARGS((void));
@@ -5334,7 +5337,7 @@
53345337 else if (*p_stl != NUL || *wp->w_p_stl != NUL)
53355338 {
53365339 /* redraw custom status line */
5337- win_redr_custom(wp, FALSE);
5340+ redraw_custum_statusline(wp);
53385341 }
53395342 #endif
53405343 else
@@ -5457,6 +5460,27 @@
54575460 #endif
54585461 }
54595462
5463+#ifdef FEAT_STL_OPT
5464+/*
5465+ * Redraw the status line according to 'statusline' and take care of any
5466+ * errors encountered.
5467+ */
5468+ static void
5469+redraw_custum_statusline(wp)
5470+ win_T *wp;
5471+{
5472+ int save_called_emsg = called_emsg;
5473+
5474+ called_emsg = FALSE;
5475+ win_redr_custom(wp, FALSE);
5476+ if (called_emsg)
5477+ set_string_option_direct((char_u *)"statusline", -1,
5478+ (char_u *)"", OPT_FREE | (*wp->w_p_stl != NUL
5479+ ? OPT_LOCAL : OPT_GLOBAL));
5480+ called_emsg |= save_called_emsg;
5481+}
5482+#endif
5483+
54605484 # ifdef FEAT_VERTSPLIT
54615485 /*
54625486 * Return TRUE if the status line of window "wp" is connected to the status
@@ -5669,8 +5693,10 @@
56695693
56705694 if (hl[n].userhl == 0)
56715695 curattr = attr;
5696+ else if (hl[n].userhl < 0)
5697+ curattr = syn_id2attr(-hl[n].userhl);
56725698 #ifdef FEAT_WINDOWS
5673- else if (wp != curwin && wp->w_status_height != 0)
5699+ else if (wp != NULL && wp != curwin && wp->w_status_height != 0)
56745700 curattr = highlight_stlnc[hl[n].userhl - 1];
56755701 #endif
56765702 else
@@ -6181,7 +6207,14 @@
61816207 if (attr > HL_ALL) /* special HL attr. */
61826208 {
61836209 if (t_colors > 1)
6210+ {
61846211 aep = syn_cterm_attr2entry(attr);
6212+ /* If the Normal FG color has BOLD attribute and the new
6213+ * HL has a FG color defined, clear BOLD. */
6214+ if (aep != NULL && aep->ae_u.cterm.fg_color
6215+ && cterm_normal_fg_bold)
6216+ out_str(T_ME);
6217+ }
61856218 else
61866219 aep = syn_term_attr2entry(attr);
61876220 if (aep == NULL) /* did ":syntax clear" */
@@ -8523,112 +8556,122 @@
85238556 /* Use the 'tabline' option if it's set. */
85248557 if (*p_tal != NUL)
85258558 {
8559+ int save_called_emsg = called_emsg;
8560+
8561+ /* Check for an error. If there is one we would loop in redrawing the
8562+ * screen. Avoid that by making 'tabline' empty. */
8563+ called_emsg = FALSE;
85268564 win_redr_custom(NULL, FALSE);
8527- return;
8528- }
8529-#endif
8530-
8531- for (tp = first_tabpage; tp != NULL; tp = tp->tp_next)
8532- ++tabcount;
8533-
8534- tabwidth = (Columns - 1 + tabcount / 2) / tabcount;
8535- if (tabwidth < 6)
8536- tabwidth = 6;
8537-
8538- attr = attr_nosel;
8539- tabcount = 0;
8540- for (tp = first_tabpage; tp != NULL && col < Columns; tp = tp->tp_next)
8541- {
8542- scol = col;
8543-
8544- if (tp->tp_topframe == topframe)
8545- attr = attr_sel;
8546- if (use_sep_chars && col > 0)
8547- screen_putchar('|', 0, col++, attr);
8548-
8549- if (tp->tp_topframe != topframe)
8550- attr = attr_nosel;
8551-
8552- screen_putchar(' ', 0, col++, attr);
8553-
8554- if (tp->tp_topframe == topframe)
8555- {
8556- cwp = curwin;
8557- wp = firstwin;
8558- }
8559- else
8560- {
8561- cwp = tp->tp_curwin;
8562- wp = tp->tp_firstwin;
8563- }
8564-
8565- modified = FALSE;
8566- for (wincount = 0; wp != NULL; wp = wp->w_next, ++wincount)
8567- if (bufIsChanged(wp->w_buffer))
8568- modified = TRUE;
8569- if (modified || wincount > 1)
8570- {
8571- if (wincount > 1)
8572- {
8573- vim_snprintf((char *)NameBuff, MAXPATHL, "%d", wincount);
8574- len = STRLEN(NameBuff);
8575- screen_puts_len(NameBuff, len, 0, col,
8565+ if (called_emsg)
8566+ set_string_option_direct((char_u *)"tabline", -1,
8567+ (char_u *)"", OPT_FREE);
8568+ called_emsg |= save_called_emsg;
8569+ }
8570+ else
8571+#endif
8572+ {
8573+ for (tp = first_tabpage; tp != NULL; tp = tp->tp_next)
8574+ ++tabcount;
8575+
8576+ tabwidth = (Columns - 1 + tabcount / 2) / tabcount;
8577+ if (tabwidth < 6)
8578+ tabwidth = 6;
8579+
8580+ attr = attr_nosel;
8581+ tabcount = 0;
8582+ for (tp = first_tabpage; tp != NULL && col < Columns; tp = tp->tp_next)
8583+ {
8584+ scol = col;
8585+
8586+ if (tp->tp_topframe == topframe)
8587+ attr = attr_sel;
8588+ if (use_sep_chars && col > 0)
8589+ screen_putchar('|', 0, col++, attr);
8590+
8591+ if (tp->tp_topframe != topframe)
8592+ attr = attr_nosel;
8593+
8594+ screen_putchar(' ', 0, col++, attr);
8595+
8596+ if (tp == curtab)
8597+ {
8598+ cwp = curwin;
8599+ wp = firstwin;
8600+ }
8601+ else
8602+ {
8603+ cwp = tp->tp_curwin;
8604+ wp = tp->tp_firstwin;
8605+ }
8606+
8607+ modified = FALSE;
8608+ for (wincount = 0; wp != NULL; wp = wp->w_next, ++wincount)
8609+ if (bufIsChanged(wp->w_buffer))
8610+ modified = TRUE;
8611+ if (modified || wincount > 1)
8612+ {
8613+ if (wincount > 1)
8614+ {
8615+ vim_snprintf((char *)NameBuff, MAXPATHL, "%d", wincount);
8616+ len = STRLEN(NameBuff);
8617+ screen_puts_len(NameBuff, len, 0, col,
85768618 #if defined(FEAT_SYN_HL)
8577- hl_combine_attr(attr, hl_attr(HLF_T))
8619+ hl_combine_attr(attr, hl_attr(HLF_T))
85788620 #else
8579- attr
8580-#endif
8581- );
8582- col += len;
8583- }
8584- if (modified)
8585- screen_puts_len((char_u *)"+", 1, 0, col++, attr);
8586- screen_putchar(' ', 0, col++, attr);
8587- }
8588-
8589- room = scol - col + tabwidth - 1;
8590- if (room > 0)
8591- {
8592- if (buf_spname(cwp->w_buffer) != NULL)
8593- STRCPY(NameBuff, buf_spname(cwp->w_buffer));
8594- else
8595- home_replace(cwp->w_buffer, cwp->w_buffer->b_fname, NameBuff,
8596- MAXPATHL, TRUE);
8597- trans_characters(NameBuff, MAXPATHL);
8598- len = vim_strsize(NameBuff);
8599- p = NameBuff;
8621+ attr
8622+#endif
8623+ );
8624+ col += len;
8625+ }
8626+ if (modified)
8627+ screen_puts_len((char_u *)"+", 1, 0, col++, attr);
8628+ screen_putchar(' ', 0, col++, attr);
8629+ }
8630+
8631+ room = scol - col + tabwidth - 1;
8632+ if (room > 0)
8633+ {
8634+ if (buf_spname(cwp->w_buffer) != NULL)
8635+ STRCPY(NameBuff, buf_spname(cwp->w_buffer));
8636+ else
8637+ home_replace(cwp->w_buffer, cwp->w_buffer->b_fname, NameBuff,
8638+ MAXPATHL, TRUE);
8639+ trans_characters(NameBuff, MAXPATHL);
8640+ len = vim_strsize(NameBuff);
8641+ p = NameBuff;
86008642 #ifdef FEAT_MBYTE
8601- if (has_mbyte)
8602- while (len > room)
8643+ if (has_mbyte)
8644+ while (len > room)
8645+ {
8646+ len -= ptr2cells(p);
8647+ mb_ptr_adv(p);
8648+ }
8649+ else
8650+#endif
8651+ if (len > room)
86038652 {
8604- len -= ptr2cells(p);
8605- mb_ptr_adv(p);
8653+ p += len - room;
8654+ len = room;
86068655 }
8607- else
8608-#endif
8609- if (len > room)
8610- {
8611- p += len - room;
8612- len = room;
8613- }
8614-
8615- screen_puts_len(p, STRLEN(p), 0, col, attr);
8616- col += len;
8617- }
8618- screen_putchar(' ', 0, col++, attr);
8619-
8620- /* Store the tab page number in TabPageIdxs[], so that jump_to_mouse()
8621- * knows where each one is. */
8622- ++tabcount;
8623- while (scol < col)
8624- TabPageIdxs[scol++] = tabcount;
8625- }
8626-
8627- if (use_sep_chars)
8628- c = '_';
8629- else
8630- c = ' ';
8631- screen_fill(0, 1, col, (int)Columns, c, c, attr_fill);
8656+
8657+ screen_puts_len(p, STRLEN(p), 0, col, attr);
8658+ col += len;
8659+ }
8660+ screen_putchar(' ', 0, col++, attr);
8661+
8662+ /* Store the tab page number in TabPageIdxs[], so that
8663+ * jump_to_mouse() knows where each one is. */
8664+ ++tabcount;
8665+ while (scol < col)
8666+ TabPageIdxs[scol++] = tabcount;
8667+ }
8668+
8669+ if (use_sep_chars)
8670+ c = '_';
8671+ else
8672+ c = ' ';
8673+ screen_fill(0, 1, col, (int)Columns, c, c, attr_fill);
8674+ }
86328675
86338676 /* Put an "X" for closing the current tab if there are several. */
86348677 if (first_tabpage->tp_next != NULL)
@@ -8731,7 +8774,9 @@
87318774 #endif
87328775 #if defined(FEAT_STL_OPT) && defined(FEAT_WINDOWS)
87338776 if ((*p_stl != NUL || *curwin->w_p_stl != NUL) && curwin->w_status_height)
8734- win_redr_custom(curwin, FALSE);
8777+ {
8778+ redraw_custum_statusline(curwin);
8779+ }
87358780 else
87368781 #endif
87378782 #ifdef FEAT_CMDL_INFO
@@ -8802,7 +8847,14 @@
88028847 #ifdef FEAT_STL_OPT
88038848 if (*p_ruf)
88048849 {
8850+ int save_called_emsg = called_emsg;
8851+
8852+ called_emsg = FALSE;
88058853 win_redr_custom(wp, TRUE);
8854+ if (called_emsg)
8855+ set_string_option_direct((char_u *)"rulerformat", -1,
8856+ (char_u *)"", OPT_FREE);
8857+ called_emsg |= save_called_emsg;
88068858 return;
88078859 }
88088860 #endif
diff -r e629de7618da -r 5b101ff9d4c4 src/structs.h
--- a/src/structs.h Tue Feb 21 22:04:51 2006 +0000
+++ b/src/structs.h Tue Feb 21 22:12:05 2006 +0000
@@ -919,7 +919,7 @@
919919 struct stl_hlrec
920920 {
921921 char_u *start;
922- int userhl;
922+ int userhl; /* 0: no HL, 1-9: User HL, < 0 for syn ID */
923923 };
924924
925925 /* Item for a hashtable. "hi_key" can be one of three values:
diff -r e629de7618da -r 5b101ff9d4c4 src/term.c
--- a/src/term.c Tue Feb 21 22:04:51 2006 +0000
+++ b/src/term.c Tue Feb 21 22:12:05 2006 +0000
@@ -5401,7 +5401,10 @@
54015401 if (i != t_colors)
54025402 {
54035403 /* Nr of colors changed, initialize highlighting and
5404- * redraw everything. */
5404+ * redraw everything. This causes a redraw, which usually
5405+ * clears the message. Try keeping the message if it
5406+ * might work. */
5407+ set_keep_msg_from_hist();
54055408 set_color_count(i);
54065409 init_highlight(TRUE, FALSE);
54075410 redraw_later(CLEAR);
diff -r e629de7618da -r 5b101ff9d4c4 src/version.h
--- a/src/version.h Tue Feb 21 22:04:51 2006 +0000
+++ b/src/version.h Tue Feb 21 22:12:05 2006 +0000
@@ -36,5 +36,5 @@
3636 #define VIM_VERSION_NODOT "vim70aa"
3737 #define VIM_VERSION_SHORT "7.0aa"
3838 #define VIM_VERSION_MEDIUM "7.0aa ALPHA"
39-#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2006 Feb 20)"
40-#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2006 Feb 20, compiled "
39+#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2006 Feb 21)"
40+#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2006 Feb 21, compiled "
旧リポジトリブラウザで表示