]> granicus.if.org Git - vim/commitdiff
In Visual mode with 'showcmd' display the number of bytes and characters.
authorBram Moolenaar <Bram@vim.org>
Sat, 17 Jul 2010 10:47:16 +0000 (12:47 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 17 Jul 2010 10:47:16 +0000 (12:47 +0200)
runtime/doc/ft_ada.txt
runtime/doc/ft_sql.txt
runtime/doc/map.txt
runtime/doc/options.txt
runtime/doc/os_vms.txt
runtime/doc/tags
runtime/doc/todo.txt
runtime/doc/various.txt
src/normal.c

index 6e065bfea7d4f5b4896f0feabefc03faa9a50382..03e695d7dd858957bf3c87050d4e3aa829c641c9 100644 (file)
@@ -176,11 +176,11 @@ g:gnat.Make()
 
                                                             *g:gnat.Pretty()*
 g:gnat.Pretty()
-               Calls|g:gnat.Pretty_Command|
+               Calls|g:gnat.Pretty_Program|
 
                                                               *g:gnat.Find()*
 g:gnat.Find()
-               Calls|g:gnat.Find_Command|
+               Calls|g:gnat.Find_Program|
 
                                                               *g:gnat.Tags()*
 g:gnat.Tags()
@@ -237,8 +237,8 @@ DEC ADA OBJECT ~
 
                                                             *g:decada.Make()*
 g:decada.Make()                function
-               Calls|g:decada.Make_Command|and displays the result inside a
-               |quickfix| window.
+               Calls |g:decada.Make_Command| and displays the result inside a
+               |quickfix| window.
 
                                                        *g:decada.Unit_Name()*
 g:decada.Unit_Name()   function
@@ -246,7 +246,7 @@ g:decada.Unit_Name()        function
 
                                                       *g:decada.Make_Command*
 g:decada.Make_Command  string
-               External command used for|g:decadat.Make()| (|'makeprg'|).
+               External command used for |g:decada.Make()| (|'makeprg'|).
 
                                                       *g:decada.Error_Format*
 g:decada.Error_Format| string
@@ -406,15 +406,15 @@ makes no difference.
 g:gnat                     object
                Control object which manages GNAT compiles.  The object
                is created when the first Ada source code is loaded provided
-               that |g:ada_default_compiler|is set to 'gnat'. See|gnat_members|
-               for details.
+               that |g:ada_default_compiler|is set to 'gnat'. See
+               |gnat_members| for details.
 
                                                                    *g:decada*
 g:decada                     object
                Control object which manages Dec Ada compiles.  The object
                is created when the first Ada source code is loaded provided
                that |g:ada_default_compiler|is set to 'decada'. See
-              |decada_members|for details.
+               |decada_members| for details.
 
 ------------------------------------------------------------------------------
 5.4 Constants ~
index e58c0afac47be9c15a2cd096ad4935789a8e705b..cfdea9adbd3e0fe1106f8875ba20a77ae9223178 100644 (file)
@@ -1,4 +1,4 @@
-*sql.txt*      For Vim version 7.3a.  Last change: 2009 Nov 03
+*ft_sql.txt*   For Vim version 7.3a.  Last change: 2009 Nov 03
 
 by David Fishburn
 
@@ -632,7 +632,7 @@ your |vimrc|: >
                   MYTABLENAME --> M
 
     omni_sql_ignorecase
-<      - Default: Current setting for|ignorecase|
+<      - Default: Current setting for 'ignorecase'
        - Valid settings are 0 or 1.
        - When entering a few letters before initiating completion, the list
          will be filtered to display only the entries which begin with the
index 8ac05b01f699397f880f188dab3db3225756bccb..1cb0675c848833e82ee8e2644a4232369dbf4daa 100644 (file)
@@ -594,7 +594,7 @@ otherwise you would not be able to use those commands anymore.  Here are a few
 suggestions:
 - Function keys <F2>, <F3>, etc..  Also the shifted function keys <S-F1>,
   <S-F2>, etc.  Note that <F1> is already used for the help command.
-- Meta-keys (with the ALT key pressed).  Depending on your keybord accented
+- Meta-keys (with the ALT key pressed).  Depending on your keyboard accented
   characters may be used as well. |:map-alt-keys|
 - Use the '_' or ',' character and then any other character.  The "_" and ","
   commands do exist in Vim (see |_| and |,|), but you probably never use them.
@@ -767,7 +767,7 @@ g@{motion}          Call the function set by the 'operatorfunc' option.
                        The function is called with one String argument:
                            "line"      {motion} was |linewise|
                            "char"      {motion} was |characterwise|
-                           "block"     {motion} was |blockwise-visual||
+                           "block"     {motion} was |blockwise-visual|
                        Although "block" would rarely appear, since it can
                        only result from Visual mode where "g@" is not useful.
                        {not available when compiled without the +eval
index b48030f1281dc065b759c9f98acb188c4cd13c83..860730f4f48bff759b5ca122efa1f87883e12bf2 100644 (file)
@@ -6065,6 +6065,8 @@ A jump table for the options with a short description can be found at |Q_op|.
        option off if your terminal is slow.
        In Visual mode the size of the selected area is shown:
        - When selecting characters within a line, the number of characters.
+         If the number of bytes is different it is also displayed: "2-6"
+         means two characters and six bytes.
        - When selecting more than one line, the number of lines.
        - When selecting a block, the size in screen characters:
          {lines}x{columns}.
index 08482bbd2131f72963cbd9019e8844a97d426367..92f00e6f5a9f37ae462aa764ab04c4c166039bc6 100644 (file)
@@ -639,7 +639,7 @@ You can now compare files in 4 ways: >
 
 DEC C uses many identifiers with '$' in them.  This is not allowed in ANSI C,
 and Vim recognises the '$' as the end of the identifier.  You can change this
-with the |iskeyword|command.
+with the 'iskeyword' option.
 Add this command to your .vimrc file: >
 
     autocmd FileType c,cpp,cs  set iskeyword+=$
index 6be654a492de6095dc8b7bc4219bc5e48f57cf76..e9a300af40eab8507d1341fdffc9d734afcf443c 100644 (file)
@@ -5638,6 +5638,7 @@ ft-xml-omni       insert.txt      /*ft-xml-omni*
 ft-xml-syntax  syntax.txt      /*ft-xml-syntax*
 ft-xpm-syntax  syntax.txt      /*ft-xpm-syntax*
 ft_ada.txt     ft_ada.txt      /*ft_ada.txt*
+ft_sql.txt     ft_sql.txt      /*ft_sql.txt*
 ftdetect       filetype.txt    /*ftdetect*
 ftp    pi_netrw.txt    /*ftp*
 ftplugin       usr_41.txt      /*ftplugin*
@@ -7504,7 +7505,6 @@ sql-object-motions        ft_sql.txt      /*sql-object-motions*
 sql-predefined-objects ft_sql.txt      /*sql-predefined-objects*
 sql-type-default       ft_sql.txt      /*sql-type-default*
 sql-types      ft_sql.txt      /*sql-types*
-sql.txt        ft_sql.txt      /*sql.txt*
 sql.vim        syntax.txt      /*sql.vim*
 sqlanywhere    ft_sql.txt      /*sqlanywhere*
 sqlanywhere.vim        syntax.txt      /*sqlanywhere.vim*
index 60e7f515d7f696e861f387483d6a07904f904dbc..8906b934b6724d9aac0c9249a1c52e8be13e6b80 100644 (file)
@@ -1155,7 +1155,7 @@ More patches:
 -   Patch for adding "space" item in 'listchars'. (Jérémie Roquet, 2009 Oct 29,
     Docs patch Oct 30)
 -   Patch for supporting #rrggbb in color terminals.  (Matt Wozniski)
-    Where is a recent version of this patch?
+    Where is a recent version of this patch?  Or use CSApprox plugin?
 -   Replace ccomplete.vim by cppcomplete.vim from www.vim.org?  script 1520 by
     Vissale Neang.  (Martin Stubenschrott) Asked Vissale to make the scripts
     more friendly for the Vim distribution.
@@ -3013,7 +3013,7 @@ Tags:
 8   For 'tags' wildcard in the file name is not supported, only in the path.
     This is due to it using |file-searching|. Suboptimal solution would be to
     make the filename or the whole option use |wildcards| globing, better
-    would be to merge the 2 kinds of globing. originall (Erik Falor, 2008
+    would be to merge the 2 kinds of globing. originally (Erik Falor, 2008
     April 18), updated (Ian Kelling, 2008 July 4)
 8   Use a mechanism similar to omni completion to figure out the kind of tab
     for CTRL-] and jump to the appropriate matching tag (if there are
index a56397246d711b6c25b0873e51fcfe812f9ccfe5..01517bbe80bf31ec918c7513f6aac2fd9e9bea78 100644 (file)
@@ -294,7 +294,7 @@ N  *+cmdline_compl* command line completion |cmdline-completion|
 N  *+cmdline_hist*     command line history |cmdline-history|
 N  *+cmdline_info*     |'showcmd'| and |'ruler'|
 N  *+comments*         |'comments'| support
-m  *+conceal*          "conceal" support, see ||conceal|| |:syn-conceal| etc.
+m  *+conceal*          "conceal" support, see |conceal| |:syn-conceal| etc.
 N  *+cryptv*           encryption support |encryption|
 B  *+cscope*           |cscope| support
 m  *+cursorbind*       |'cursorbind'| support
index 3321b3ff83f6b26e08fa33c8c87c4ca36ed378b9..727ecd059004940f306880680ec3d320b9a16e2b 100644 (file)
@@ -3756,9 +3756,40 @@ clear_showcmd()
        else if (VIsual_mode == 'V' || VIsual.lnum != curwin->w_cursor.lnum)
            sprintf((char *)showcmd_buf, "%ld", lines);
        else
-           sprintf((char *)showcmd_buf, "%ld", (long)(cursor_bot
-                   ? curwin->w_cursor.col - VIsual.col
-                   : VIsual.col - curwin->w_cursor.col) + (*p_sel != 'e'));
+       {
+           char_u  *s, *e;
+           int     l;
+           int     bytes = 0;
+           int     chars = 0;
+
+           if (cursor_bot)
+           {
+               s = ml_get_pos(&VIsual);
+               e = ml_get_cursor();
+           }
+           else
+           {
+               s = ml_get_cursor();
+               e = ml_get_pos(&VIsual);
+           }
+           while ((*p_sel != 'e') ? s <= e : s < e)
+           {
+               l = (*mb_ptr2len)(s);
+               if (l == 0)
+               {
+                   ++bytes;
+                   ++chars;
+                   break;  /* end of line */
+               }
+               bytes += l;
+               ++chars;
+               s += l;
+           }
+           if (bytes == chars)
+               sprintf((char *)showcmd_buf, "%d", chars);
+           else
+               sprintf((char *)showcmd_buf, "%d-%d", chars, bytes);
+       }
        showcmd_buf[SHOWCMD_COLS] = NUL;        /* truncate */
        showcmd_visual = TRUE;
     }