]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
updated for version 7.0203 v7.0203
authorBram Moolenaar <Bram@vim.org>
Tue, 21 Feb 2006 22:12:05 +0000 (22:12 +0000)
committerBram Moolenaar <Bram@vim.org>
Tue, 21 Feb 2006 22:12:05 +0000 (22:12 +0000)
19 files changed:
runtime/doc/options.txt
runtime/doc/tags
runtime/doc/todo.txt
runtime/doc/version7.txt
runtime/syntax/mgl.vim [new file with mode: 0644]
src/eval.c
src/ex_cmds.c
src/globals.h
src/gui_beval.c
src/main.c
src/memline.c
src/misc1.c
src/misc2.c
src/option.c
src/option.h
src/screen.c
src/structs.h
src/term.c
src/version.h

index 53b9899a6a54b627eff6b6bc748df3a1b04647e3..53411ad49ccd7a6cdb2b367b21f7246f65bf8694 100644 (file)
@@ -1,4 +1,4 @@
-*options.txt*  For Vim version 7.0aa.  Last change: 2006 Feb 20
+*options.txt*  For Vim version 7.0aa.  Last change: 2006 Feb 21
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -6002,6 +6002,14 @@ A jump table for the options with a short description can be found at |Q_op|.
        All fields except the {item} is optional.  A single percent sign can
        be given as "%%".  Up to 80 items can be specified.
 
+       When the option starts with "%!" then it is used as an expression,
+       evaluated and the result is used as the option value.  Example: >
+               :set statusline=%!MyStatusLine()
+<      The result can contain %{} items that will be evaluated too.
+
+       When there is error while evaluating the option then it will be made
+       empty to avoid further errors.  Otherwise screen updating would loop.
+
        Note that the only effect of 'ruler' when this option is set (and
        'laststatus' is 2) is controlling the output of |CTRL-G|.
 
@@ -6060,7 +6068,7 @@ A jump table for the options with a short description can be found at |Q_op|.
              percentage described for 'ruler'.  Always 3 in length.
        a S   Argument list status as in default title.  ({current} of {max})
              Empty if the argument file count is zero or one.
-       { NF  Evaluate expression between '{' and '}' and substitute result.
+       { NF  Evaluate expression between '%{' and '}' and substitute result.
              Note that there is no '%' before the closing '}'.
        ( -   Start of item group.  Can be used for setting the width and
              alignment of a section.  Must be followed by %) somewhere.
@@ -6069,6 +6077,10 @@ A jump table for the options with a short description can be found at |Q_op|.
              No width fields allowed.
        = -   Separation point between left and right aligned items.
              No width fields allowed.
+       # -   Set highlight group.  The name must follow and then a # again.
+             Thus use %#HLname# for highlight group HLname.  The same
+             highlighting is used, also for the statusline of non-current
+             windows.
        * -   Set highlight group to User{N}, where {N} is taken from the
              minwid field, e.g. %1*.  Restore normal highlight with %* or %0*.
              The difference between User{N} and StatusLine  will be applied
@@ -6264,7 +6276,7 @@ A jump table for the options with a short description can be found at |Q_op|.
 
        The value is evaluated like with 'statusline'.  You can use
        |tabpagenr()|, |tabpagewinnr()| and |tabpagebuflist()| to figure out
-       the text to be displayed.
+       the text to be displayed.  See |setting-tabline| for more info.
 
        Keep in mind that only one of the tab pages is the current one, others
        are invisible and you can't jump to their windows.
index 517c4dd764033139ca3bc957c8229d51707996df..630e0f880d62dc36d013f76176d3c4c50dd1e0e7 100644 (file)
@@ -6582,6 +6582,7 @@ setloclist()      eval.txt        /*setloclist()*
 setqflist()    eval.txt        /*setqflist()*
 setreg()       eval.txt        /*setreg()*
 setting-guifont        gui.txt /*setting-guifont*
+setting-tabline        tabpage.txt     /*setting-tabline*
 setwinvar()    eval.txt        /*setwinvar()*
 sftp   pi_netrw.txt    /*sftp*
 sgml.vim       syntax.txt      /*sgml.vim*
index 94218ec2754766a77b1a22ea1f12b410857134c1..230ec6efcceec6e37f67dc43d84b17e1fe34f5e1 100644 (file)
@@ -1,4 +1,4 @@
-*todo.txt*      For Vim version 7.0aa.  Last change: 2006 Feb 20
+*todo.txt*      For Vim version 7.0aa.  Last change: 2006 Feb 21
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -30,7 +30,10 @@ be worked on, but only if you sponsor Vim development.  See |sponsor|.
                                                        *known-bugs*
 -------------------- Known bugs and current work -----------------------
 
-'tabline' documentation with an example; esp for the highlighting
+Remove resetting "bold" from screen_start_highlight()?
+
+Using 'tabline' breaks using mouse to select a tab.  How to do that?
+See suggestion from Tony Mechelynck.
 
 P_INSECURE should be remembered for local option values separately.
 
@@ -63,6 +66,7 @@ Open new tab by double click in tab line.
     ":tab!" to open it at the end, ":0tab" to open at the start.
     ":tab split" opens tab with window same as current window.
     ":tpsplit" would split the tab with all its windows.
+In GUI: right click can popup menu to close a specific tab.
 Option to put tab line at the left or right?  Need an option to specify its
 witdh.  It's like a separate window with ":tabs" output.
     :tabdo    ":tabdo windo cmd" should also work
@@ -85,6 +89,8 @@ windows.  Let's call them "tab pages".
 
 Crash with X command server (Ciaran McCreesh).
 
+"dip" in end empty lines at end of file leaves one line. (Matt Mzyzik)
+
 Ctags still hasn't included the patch.  Darren is looking for someone to do
 maintanance.
 
index 7f93bcfba2df6c45982769fbe24532c03c5516a3..4d9fd51c1b74552dffe553c46b18644e8cac1b82 100644 (file)
@@ -1,4 +1,4 @@
-*version7.txt*  For Vim version 7.0aa.  Last change: 2006 Feb 18
+*version7.txt*  For Vim version 7.0aa.  Last change: 2006 Feb 21
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -654,6 +654,8 @@ New Keymaps: ~
 
 Sinhala (Sri Lanka) (Harshula Jayasuriya)
 
+Tamil in TSCII encoding (Yegappan Lakshmanan)
+
 
 New message translations: ~
 
@@ -1016,6 +1018,12 @@ Insert mode completion for whole lines now also searches unloaded buffers.
 The colortest.vim script can now be invoked directly with ":source" or
 ":runtime".
 
+The 'statusline' option and other options that support the same format can now
+use these new features:
+- When it starts with "%!" the value is first evaluated as an expression
+  before parsing the value.
+- "%#HLname#" can be used to start highlighting with HLname.
+
 ==============================================================================
 COMPILE TIME CHANGES                                   *compile-changes-7*
 
@@ -1710,4 +1718,8 @@ be written without write permission. (Julian Bridle)
 Motif: In diff mode dragging one scrollbar didn't update the scrollbar of the
 other diff'ed window.
 
+When editing in an xterm with a different number of colors than expected the
+screen would be cleared and redrawn, causing the message about the edited file
+to be cleared.  Now set "keep_msg" to redraw the last message.
+
  vim:tw=78:ts=8:ft=help:norl:
diff --git a/runtime/syntax/mgl.vim b/runtime/syntax/mgl.vim
new file mode 100644 (file)
index 0000000..6049e8a
--- /dev/null
@@ -0,0 +1,128 @@
+" Vim syntax file
+" Language:    MGL
+" Version: 1.0
+" Last Change: 2006 Feb 21
+" Maintainer:  Gero Kuhlmann <gero@gkminix.han.de>
+"
+" $Id$
+"
+if version < 600
+  syntax clear
+elseif exists("b:current_syntax")
+  finish
+endif
+
+
+syn sync lines=250
+
+syn keyword mglBoolean         true false
+syn keyword mglConditional     if else then
+syn keyword mglConstant                nil
+syn keyword mglPredefined      maxint
+syn keyword mglLabel           case goto label
+syn keyword mglOperator                to downto in of with
+syn keyword mglOperator                and not or xor div mod
+syn keyword mglRepeat          do for repeat while to until
+syn keyword mglStatement       procedure function break continue return restart
+syn keyword mglStatement       program begin end const var type
+syn keyword mglStruct          record
+syn keyword mglType            integer string char boolean char ipaddr array
+
+
+" String
+if !exists("mgl_one_line_string")
+  syn region  mglString matchgroup=mglString start=+'+ end=+'+ contains=mglStringEscape
+  syn region  mglString matchgroup=mglString start=+"+ end=+"+ contains=mglStringEscapeGPC
+else
+  "wrong strings
+  syn region  mglStringError matchgroup=mglStringError start=+'+ end=+'+ end=+$+ contains=mglStringEscape
+  syn region  mglStringError matchgroup=mglStringError start=+"+ end=+"+ end=+$+ contains=mglStringEscapeGPC
+  "right strings
+  syn region  mglString matchgroup=mglString start=+'+ end=+'+ oneline contains=mglStringEscape
+  syn region  mglString matchgroup=mglString start=+"+ end=+"+ oneline contains=mglStringEscapeGPC
+end
+syn match   mglStringEscape    contained "''"
+syn match   mglStringEscapeGPC contained '""'
+
+
+if exists("mgl_symbol_operator")
+  syn match   mglSymbolOperator                "[+\-/*=\%]"
+  syn match   mglSymbolOperator                "[<>]=\="
+  syn match   mglSymbolOperator                "<>"
+  syn match   mglSymbolOperator                ":="
+  syn match   mglSymbolOperator                "[()]"
+  syn match   mglSymbolOperator                "\.\."
+  syn match   mglMatrixDelimiter       "(."
+  syn match   mglMatrixDelimiter       ".)"
+  syn match   mglMatrixDelimiter       "[][]"
+endif
+
+syn match  mglNumber   "-\=\<\d\+\>"
+syn match  mglHexNumber        "\$[0-9a-fA-F]\+\>"
+syn match  mglCharacter        "\#[0-9]\+\>"
+syn match  mglIpAddr   "[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\>"
+
+syn region mglComment  start="(\*"  end="\*)"
+syn region mglComment  start="{"  end="}"
+syn region mglComment  start="//"  end="$"
+
+if !exists("mgl_no_functions")
+  syn keyword mglFunction      dispose new
+  syn keyword mglFunction      get load print select
+  syn keyword mglFunction      odd pred succ
+  syn keyword mglFunction      chr ord abs sqr
+  syn keyword mglFunction      exit
+  syn keyword mglOperator      at timeout
+endif
+
+
+syn region mglPreProc  start="(\*\$"  end="\*)"
+syn region mglPreProc  start="{\$"  end="}"
+
+syn keyword mglException       try except raise
+syn keyword mglPredefined      exception
+
+
+" Define the default highlighting.
+" For version 5.7 and earlier: only when not done already
+" For version 5.8 and later: only when an item doesn't have highlighting yet
+if version >= 508 || !exists("did_mgl_syn_inits")
+  if version < 508
+    let did_mgl_syn_inits = 1
+    command -nargs=+ HiLink hi link <args>
+  else
+    command -nargs=+ HiLink hi def link <args>
+  endif
+
+  HiLink mglBoolean            Boolean
+  HiLink mglComment            Comment
+  HiLink mglConditional                Conditional
+  HiLink mglConstant           Constant
+  HiLink mglException          Exception
+  HiLink mglFunction           Function
+  HiLink mglLabel              Label
+  HiLink mglMatrixDelimiter    Identifier
+  HiLink mglNumber             Number
+  HiLink mglHexNumber          Number
+  HiLink mglCharacter          Number
+  HiLink mglIpAddr             Number
+  HiLink mglOperator           Operator
+  HiLink mglPredefined         mglFunction
+  HiLink mglPreProc            PreProc
+  HiLink mglRepeat             Repeat
+  HiLink mglStatement          Statement
+  HiLink mglString             String
+  HiLink mglStringEscape       Special
+  HiLink mglStringEscapeGPC    Special
+  HiLink mglStringError                Error
+  HiLink mglStruct             mglStatement
+  HiLink mglSymbolOperator     mglOperator
+  HiLink mglType               Type
+
+  delcommand HiLink
+endif
+
+
+let b:current_syntax = "mgl"
+
+" vim: ts=8 sw=2
index f857b8fc9dbdbef1fcdc7ecc1f87ec18ab008345..506cfa5bb5bf3a06c5a9977cf3ee5f0307c660ac 100644 (file)
@@ -14895,7 +14895,7 @@ f_tabpagebuflist(argvars, rettv)
     {
        tp = find_tabpage((int)get_tv_number(&argvars[0]));
        if (tp != NULL)
-           wp = tp->tp_firstwin;
+           wp = (tp == curtab) ? firstwin : tp->tp_firstwin;
     }
     if (wp == NULL)
        rettv->vval.v_number = 0;
index 5e4d59840ed26b4081c93619fb69cd34b98ab97f..15b695a4be390cd36aefaca90b7669eb2742933e 100644 (file)
@@ -1212,11 +1212,8 @@ do_filter(line1, line2, eap, cmd, do_in, do_out)
                vim_snprintf((char *)msg_buf, sizeof(msg_buf),
                                    _("%ld lines filtered"), (long)linecount);
                if (msg(msg_buf) && !msg_scroll)
-               {
                    /* save message to display it after redraw */
-                   set_keep_msg(msg_buf);
-                   keep_msg_attr = 0;
-               }
+                   set_keep_msg(msg_buf, 0);
            }
            else
                msgmore((long)linecount);
@@ -4910,11 +4907,8 @@ do_sub_msg(count_only)
            vim_snprintf((char *)msg_buf + len, sizeof(msg_buf) - len,
                    _(" on %ld lines"), (long)sub_nlines);
        if (msg(msg_buf))
-       {
            /* save message to display it after redraw */
-           set_keep_msg(msg_buf);
-           keep_msg_attr = 0;
-       }
+           set_keep_msg(msg_buf, 0);
        return TRUE;
     }
     if (got_int)
index 23fdd6673da423919f60a4a22f49a98d8a6201e1..5162b78c873f7ec31efc77a5235882dd3cba89a9 100644 (file)
@@ -488,7 +488,7 @@ EXTERN win_T        *prevwin INIT(= NULL);  /* previous window */
 # define FOR_ALL_WINDOWS(wp) for (wp = firstwin; wp != NULL; wp = wp->w_next)
 #define FOR_ALL_TAB_WINDOWS(tp, wp) \
     for ((tp) = first_tabpage; (tp) != NULL; (tp) = (tp)->tp_next) \
-       for ((wp) = ((tp)->tp_topframe == topframe) \
+       for ((wp) = ((tp) == curtab) \
                ? firstwin : (tp)->tp_firstwin; (wp); (wp) = (wp)->w_next)
 #else
 # define firstwin curwin
@@ -1446,7 +1446,10 @@ EXTERN char_u e_invexprmsg[]     INIT(= N_("E449: Invalid expression received"));
 EXTERN char_u e_guarded[]      INIT(= N_("E463: Region is guarded, cannot modify"));
 EXTERN char_u e_nbreadonly[]   INIT(= N_("E744: NetBeans does not allow changes in read-only files"));
 #endif
+#if defined(FEAT_INS_EXPAND) || defined(FEAT_EVAL) || defined(FEAT_SYN_HL) \
+       || defined(FEAT_WINDOWS)
 EXTERN char_u e_intern2[]      INIT(= N_("E685: Internal error: %s"));
+#endif
 EXTERN char_u e_maxmempat[]    INIT(= N_("E363: pattern uses more memory than 'maxmempattern'"));
 EXTERN char_u e_emptybuf[]     INIT(= N_("E749: empty buffer"));
 
index 6c628cda62d41fd75c95f65cd16df83040d59e89..a8eac10a30dfe4019c5a4be635b1c5a4dc92641a 100644 (file)
@@ -103,7 +103,11 @@ general_beval_cb(beval, state)
 # else
    /* Assume Athena */
 #  include <X11/Shell.h>
-#  include <X11/Xaw/Label.h>
+#  ifdef FEAT_GUI_NEXTAW
+#   include <X11/neXtaw/Label.h>
+#  else
+#   include <X11/Xaw/Label.h>
+#  endif
 # endif
 #endif
 
index 3dc72e15dae2f410d2f942b1d410ec9f8015bfaf..755f74ef2f72435c72dd2f28bf1ebf7f79bbfa52 100644 (file)
@@ -1059,6 +1059,7 @@ main_loop(cmdwin, noexmode)
                /* msg_attr_keep() will set keep_msg to NULL, must free the
                 * string here. */
                p = keep_msg;
+               keep_msg = NULL;
                msg_attr(p, keep_msg_attr);
                vim_free(p);
            }
@@ -1169,7 +1170,7 @@ getout(exitval)
     for (tp = first_tabpage; tp != NULL; tp = next_tp)
     {
        next_tp = tp->tp_next;
-       for (wp = (tp->tp_topframe == topframe)
+       for (wp = (tp == curtab)
                    ? firstwin : tp->tp_firstwin; wp != NULL; wp = wp->w_next)
        {
            buf = wp->w_buffer;
index c87a955ad0bf3d80105f21498bc07c7f22202346..451ace35a7989883db2c08f7923e18d225b855f3 100644 (file)
@@ -2740,10 +2740,8 @@ ml_delete_int(buf, lnum, message)
                && !netbeansSuppressNoLines
 #endif
           )
-       {
-           set_keep_msg((char_u *)_(no_lines_msg));
-           keep_msg_attr = 0;
-       }
+           set_keep_msg((char_u *)_(no_lines_msg), 0);
+
        /* FEAT_BYTEOFF already handled in there, dont worry 'bout it below */
        i = ml_replace((linenr_T)1, (char_u *)"", TRUE);
        buf->b_ml.ml_flags |= ML_EMPTY;
index 97e41964f234433fead14bf391053321b41d1b22..a3b2d3ce3bfe0fdcd62a663ca589567f85c55054 100644 (file)
@@ -3241,8 +3241,7 @@ msgmore(n)
            STRCAT(msg_buf, _(" (Interrupted)"));
        if (msg(msg_buf))
        {
-           set_keep_msg(msg_buf);
-           keep_msg_attr = 0;
+           set_keep_msg(msg_buf, 0);
            keep_msg_more = TRUE;
        }
     }
index 680202f1cdd3511d1946069868522c27bdec7d2a..79a5174ab95cdc2f5f4ad52dcb33f5892481b5c6 100644 (file)
@@ -1026,7 +1026,7 @@ free_all_mem()
     vim_free(clip_exclude_prog);
     vim_free(last_cmdline);
     vim_free(new_last_cmdline);
-    set_keep_msg(NULL);
+    set_keep_msg(NULL, 0);
     vim_free(ff_expand_buffer);
 
     /* Clear cmdline history. */
index 601a97aa24596e8c31ccccc1d81c68d5a46a8d04..bc53237eba35d8b250750c084cf5930482b7a7e1 100644 (file)
@@ -6524,7 +6524,7 @@ check_stl_option(s)
            s++;
        while (VIM_ISDIGIT(*s))
            s++;
-       if (*s == STL_HIGHLIGHT)
+       if (*s == STL_USER_HL)
            continue;
        if (*s == '.')
        {
index 4dac4cc3382d7aaf58bdfdfe2d50a5f83aeada8e..57da84222459367cd305a97445ee6fde8c3c25b4 100644 (file)
 #define STL_VIM_EXPR   '{'             /* start of expression to substitute */
 #define STL_MIDDLEMARK '='             /* separation between left and right */
 #define STL_TRUNCMARK  '<'             /* truncation mark if line is too long*/
-#define STL_HIGHLIGHT  '*'             /* highlight from (User)1..9 or 0 */
-#define STL_ALL                ((char_u *) "fFtcvVlLknoObBrRhHmYyWwMpPaN{")
+#define STL_USER_HL    '*'             /* highlight from (User)1..9 or 0 */
+#define STL_HIGHLIGHT  '#'             /* highlight name */
+#define STL_ALL                ((char_u *) "fFtcvVlLknoObBrRhHmYyWwMpPaN{#")
 
 /* flags used for parsed 'wildmode' */
 #define WIM_FULL       1
index d6b9b7d55f8a4758833844181aa1904ac5fb13fa..33037cfa725be8a8b410c8789287f1e274d33312 100644 (file)
@@ -146,6 +146,9 @@ static void screen_line __ARGS((int row, int coloff, int endcol, int clear_width
 #ifdef FEAT_VERTSPLIT
 static void draw_vsep_win __ARGS((win_T *wp, int row));
 #endif
+#ifdef FEAT_STL_OPT
+static void redraw_custum_statusline __ARGS((win_T *wp));
+#endif
 #ifdef FEAT_SEARCH_EXTRA
 static void start_search_hl __ARGS((void));
 static void end_search_hl __ARGS((void));
@@ -5334,7 +5337,7 @@ win_redr_status(wp)
     else if (*p_stl != NUL || *wp->w_p_stl != NUL)
     {
        /* redraw custom status line */
-       win_redr_custom(wp, FALSE);
+       redraw_custum_statusline(wp);
     }
 #endif
     else
@@ -5457,6 +5460,27 @@ win_redr_status(wp)
 #endif
 }
 
+#ifdef FEAT_STL_OPT
+/*
+ * Redraw the status line according to 'statusline' and take care of any
+ * errors encountered.
+ */
+    static void
+redraw_custum_statusline(wp)
+    win_T          *wp;
+{
+    int        save_called_emsg = called_emsg;
+
+    called_emsg = FALSE;
+    win_redr_custom(wp, FALSE);
+    if (called_emsg)
+       set_string_option_direct((char_u *)"statusline", -1,
+               (char_u *)"", OPT_FREE | (*wp->w_p_stl != NUL
+                                                  ? OPT_LOCAL : OPT_GLOBAL));
+    called_emsg |= save_called_emsg;
+}
+#endif
+
 # ifdef FEAT_VERTSPLIT
 /*
  * Return TRUE if the status line of window "wp" is connected to the status
@@ -5669,8 +5693,10 @@ win_redr_custom(wp, draw_ruler)
 
        if (hl[n].userhl == 0)
            curattr = attr;
+       else if (hl[n].userhl < 0)
+           curattr = syn_id2attr(-hl[n].userhl);
 #ifdef FEAT_WINDOWS
-       else if (wp != curwin && wp->w_status_height != 0)
+       else if (wp != NULL && wp != curwin && wp->w_status_height != 0)
            curattr = highlight_stlnc[hl[n].userhl - 1];
 #endif
        else
@@ -6181,7 +6207,14 @@ screen_start_highlight(attr)
            if (attr > HL_ALL)                          /* special HL attr. */
            {
                if (t_colors > 1)
+               {
                    aep = syn_cterm_attr2entry(attr);
+                   /* If the Normal FG color has BOLD attribute and the new
+                    * HL has a FG color defined, clear BOLD. */
+                   if (aep != NULL && aep->ae_u.cterm.fg_color
+                                                     && cterm_normal_fg_bold)
+                       out_str(T_ME);
+               }
                else
                    aep = syn_term_attr2entry(attr);
                if (aep == NULL)            /* did ":syntax clear" */
@@ -8523,113 +8556,123 @@ draw_tabline()
     /* Use the 'tabline' option if it's set. */
     if (*p_tal != NUL)
     {
+       int     save_called_emsg = called_emsg;
+
+       /* Check for an error.  If there is one we would loop in redrawing the
+        * screen.  Avoid that by making 'tabline' empty. */
+       called_emsg = FALSE;
        win_redr_custom(NULL, FALSE);
-       return;
+       if (called_emsg)
+           set_string_option_direct((char_u *)"tabline", -1,
+                                                     (char_u *)"", OPT_FREE);
+       called_emsg |= save_called_emsg;
     }
+    else
 #endif
+    {
+       for (tp = first_tabpage; tp != NULL; tp = tp->tp_next)
+           ++tabcount;
 
-    for (tp = first_tabpage; tp != NULL; tp = tp->tp_next)
-       ++tabcount;
-
-    tabwidth = (Columns - 1 + tabcount / 2) / tabcount;
-    if (tabwidth < 6)
-       tabwidth = 6;
+       tabwidth = (Columns - 1 + tabcount / 2) / tabcount;
+       if (tabwidth < 6)
+           tabwidth = 6;
 
-    attr = attr_nosel;
-    tabcount = 0;
-    for (tp = first_tabpage; tp != NULL && col < Columns; tp = tp->tp_next)
-    {
-       scol = col;
+       attr = attr_nosel;
+       tabcount = 0;
+       for (tp = first_tabpage; tp != NULL && col < Columns; tp = tp->tp_next)
+       {
+           scol = col;
 
-       if (tp->tp_topframe == topframe)
-           attr = attr_sel;
-       if (use_sep_chars && col > 0)
-           screen_putchar('|', 0, col++, attr);
+           if (tp->tp_topframe == topframe)
+               attr = attr_sel;
+           if (use_sep_chars && col > 0)
+               screen_putchar('|', 0, col++, attr);
 
-       if (tp->tp_topframe != topframe)
-           attr = attr_nosel;
+           if (tp->tp_topframe != topframe)
+               attr = attr_nosel;
 
-       screen_putchar(' ', 0, col++, attr);
+           screen_putchar(' ', 0, col++, attr);
 
-       if (tp->tp_topframe == topframe)
-       {
-           cwp = curwin;
-           wp = firstwin;
-       }
-       else
-       {
-           cwp = tp->tp_curwin;
-           wp = tp->tp_firstwin;
-       }
+           if (tp == curtab)
+           {
+               cwp = curwin;
+               wp = firstwin;
+           }
+           else
+           {
+               cwp = tp->tp_curwin;
+               wp = tp->tp_firstwin;
+           }
 
-       modified = FALSE;
-       for (wincount = 0; wp != NULL; wp = wp->w_next, ++wincount)
-           if (bufIsChanged(wp->w_buffer))
-               modified = TRUE;
-       if (modified || wincount > 1)
-       {
-           if (wincount > 1)
+           modified = FALSE;
+           for (wincount = 0; wp != NULL; wp = wp->w_next, ++wincount)
+               if (bufIsChanged(wp->w_buffer))
+                   modified = TRUE;
+           if (modified || wincount > 1)
            {
-               vim_snprintf((char *)NameBuff, MAXPATHL, "%d", wincount);
-               len = STRLEN(NameBuff);
-               screen_puts_len(NameBuff, len, 0, col,
+               if (wincount > 1)
+               {
+                   vim_snprintf((char *)NameBuff, MAXPATHL, "%d", wincount);
+                   len = STRLEN(NameBuff);
+                   screen_puts_len(NameBuff, len, 0, col,
 #if defined(FEAT_SYN_HL)
-                                      hl_combine_attr(attr, hl_attr(HLF_T))
+                                          hl_combine_attr(attr, hl_attr(HLF_T))
 #else
-                                      attr
+                                          attr
 #endif
-                                          );
-               col += len;
+                                              );
+                   col += len;
+               }
+               if (modified)
+                   screen_puts_len((char_u *)"+", 1, 0, col++, attr);
+               screen_putchar(' ', 0, col++, attr);
            }
-           if (modified)
-               screen_puts_len((char_u *)"+", 1, 0, col++, attr);
-           screen_putchar(' ', 0, col++, attr);
-       }
 
-       room = scol - col + tabwidth - 1;
-       if (room > 0)
-       {
-           if (buf_spname(cwp->w_buffer) != NULL)
-               STRCPY(NameBuff, buf_spname(cwp->w_buffer));
-           else
-               home_replace(cwp->w_buffer, cwp->w_buffer->b_fname, NameBuff,
-                                                             MAXPATHL, TRUE);
-           trans_characters(NameBuff, MAXPATHL);
-           len = vim_strsize(NameBuff);
-           p = NameBuff;
+           room = scol - col + tabwidth - 1;
+           if (room > 0)
+           {
+               if (buf_spname(cwp->w_buffer) != NULL)
+                   STRCPY(NameBuff, buf_spname(cwp->w_buffer));
+               else
+                   home_replace(cwp->w_buffer, cwp->w_buffer->b_fname, NameBuff,
+                                                                 MAXPATHL, TRUE);
+               trans_characters(NameBuff, MAXPATHL);
+               len = vim_strsize(NameBuff);
+               p = NameBuff;
 #ifdef FEAT_MBYTE
-           if (has_mbyte)
-               while (len > room)
+               if (has_mbyte)
+                   while (len > room)
+                   {
+                       len -= ptr2cells(p);
+                       mb_ptr_adv(p);
+                   }
+               else
+#endif
+                   if (len > room)
                {
-                   len -= ptr2cells(p);
-                   mb_ptr_adv(p);
+                   p += len - room;
+                   len = room;
                }
-           else
-#endif
-               if (len > room)
-           {
-               p += len - room;
-               len = room;
+
+               screen_puts_len(p, STRLEN(p), 0, col, attr);
+               col += len;
            }
+           screen_putchar(' ', 0, col++, attr);
 
-           screen_puts_len(p, STRLEN(p), 0, col, attr);
-           col += len;
+           /* Store the tab page number in TabPageIdxs[], so that
+            * jump_to_mouse() knows where each one is. */
+           ++tabcount;
+           while (scol < col)
+               TabPageIdxs[scol++] = tabcount;
        }
-       screen_putchar(' ', 0, col++, attr);
 
-       /* Store the tab page number in TabPageIdxs[], so that jump_to_mouse()
-        * knows where each one is. */
-       ++tabcount;
-       while (scol < col)
-           TabPageIdxs[scol++] = tabcount;
+       if (use_sep_chars)
+           c = '_';
+       else
+           c = ' ';
+       screen_fill(0, 1, col, (int)Columns, c, c, attr_fill);
     }
 
-    if (use_sep_chars)
-       c = '_';
-    else
-       c = ' ';
-    screen_fill(0, 1, col, (int)Columns, c, c, attr_fill);
-
     /* Put an "X" for closing the current tab if there are several. */
     if (first_tabpage->tp_next != NULL)
        screen_putchar('X', 0, (int)Columns - 1, attr_nosel);
@@ -8731,7 +8774,9 @@ showruler(always)
 #endif
 #if defined(FEAT_STL_OPT) && defined(FEAT_WINDOWS)
     if ((*p_stl != NUL || *curwin->w_p_stl != NUL) && curwin->w_status_height)
-       win_redr_custom(curwin, FALSE);
+    {
+       redraw_custum_statusline(curwin);
+    }
     else
 #endif
 #ifdef FEAT_CMDL_INFO
@@ -8802,7 +8847,14 @@ win_redr_ruler(wp, always)
 #ifdef FEAT_STL_OPT
     if (*p_ruf)
     {
+       int     save_called_emsg = called_emsg;
+
+       called_emsg = FALSE;
        win_redr_custom(wp, TRUE);
+       if (called_emsg)
+           set_string_option_direct((char_u *)"rulerformat", -1,
+                                                     (char_u *)"", OPT_FREE);
+       called_emsg |= save_called_emsg;
        return;
     }
 #endif
index e5f59f236b8382850f460e7f125e9816804835cf..98d7ea912632444d52078fe3a79a9476fb738729 100644 (file)
@@ -919,7 +919,7 @@ struct mapblock
 struct stl_hlrec
 {
     char_u     *start;
-    int                userhl;
+    int                userhl;         /* 0: no HL, 1-9: User HL, < 0 for syn ID */
 };
 
 /* Item for a hashtable.  "hi_key" can be one of three values:
index 37b84c74fd433d308ed99472a2504415adc93434..94125a8fe81595a99634235bc45a8cb21fd6f647 100644 (file)
@@ -5401,7 +5401,10 @@ got_code_from_term(code, len)
                if (i != t_colors)
                {
                    /* Nr of colors changed, initialize highlighting and
-                    * redraw everything. */
+                    * redraw everything.  This causes a redraw, which usually
+                    * clears the message.  Try keeping the message if it
+                    * might work. */
+                   set_keep_msg_from_hist();
                    set_color_count(i);
                    init_highlight(TRUE, FALSE);
                    redraw_later(CLEAR);
index 94588104bface241bac2ce2aac885175adaeaff4..9e8fe2dbb8f8622ac35dac096cb998af9b930df3 100644 (file)
@@ -36,5 +36,5 @@
 #define VIM_VERSION_NODOT      "vim70aa"
 #define VIM_VERSION_SHORT      "7.0aa"
 #define VIM_VERSION_MEDIUM     "7.0aa ALPHA"
-#define VIM_VERSION_LONG       "VIM - Vi IMproved 7.0aa ALPHA (2006 Feb 20)"
-#define VIM_VERSION_LONG_DATE  "VIM - Vi IMproved 7.0aa ALPHA (2006 Feb 20, compiled "
+#define VIM_VERSION_LONG       "VIM - Vi IMproved 7.0aa ALPHA (2006 Feb 21)"
+#define VIM_VERSION_LONG_DATE  "VIM - Vi IMproved 7.0aa ALPHA (2006 Feb 21, compiled "