mirror of
https://github.com/vim/vim.git
synced 2025-07-25 10:54:51 -04:00
updated for version 7.0060
This commit is contained in:
parent
152c9dd52b
commit
e2cc9702a6
@ -1,4 +1,4 @@
|
|||||||
*eval.txt* For Vim version 7.0aa. Last change: 2005 Mar 07
|
*eval.txt* For Vim version 7.0aa. Last change: 2005 Mar 15
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -9,7 +9,7 @@ Expression evaluation *expression* *expr* *E15* *eval*
|
|||||||
Using expressions is introduced in chapter 41 of the user manual |usr_41.txt|.
|
Using expressions is introduced in chapter 41 of the user manual |usr_41.txt|.
|
||||||
|
|
||||||
Note: Expression evaluation can be disabled at compile time. If this has been
|
Note: Expression evaluation can be disabled at compile time. If this has been
|
||||||
done, the features in this document are not available. See |+eval| and
|
done, the features in this document are not available. See |+eval| and
|
||||||
|no-eval-feature|.
|
|no-eval-feature|.
|
||||||
|
|
||||||
1. Variables |variables|
|
1. Variables |variables|
|
||||||
@ -445,7 +445,7 @@ expect ":echo adict" to show the items from bdict after the older entries in
|
|||||||
adict.
|
adict.
|
||||||
|
|
||||||
Weeding out entries from a Dictionary can be done with |filter()|: >
|
Weeding out entries from a Dictionary can be done with |filter()|: >
|
||||||
:call filter(dict 'v:val =~ "x"')
|
:call filter(dict 'v:val =~ "x"')
|
||||||
This removes all entries from "dict" with a value not matching 'x'.
|
This removes all entries from "dict" with a value not matching 'x'.
|
||||||
|
|
||||||
|
|
||||||
@ -1454,7 +1454,7 @@ diff_hlID( {lnum}, {col}) Number diff highlighting at {lnum}/{col}
|
|||||||
empty( {expr}) Number TRUE if {expr} is empty
|
empty( {expr}) Number TRUE if {expr} is empty
|
||||||
errorlist() List list of quickfix items
|
errorlist() List list of quickfix items
|
||||||
escape( {string}, {chars}) String escape {chars} in {string} with '\'
|
escape( {string}, {chars}) String escape {chars} in {string} with '\'
|
||||||
eval( {string}) any evaluate {string} into its value
|
eval( {string}) any evaluate {string} into its value
|
||||||
eventhandler( ) Number TRUE if inside an event handler
|
eventhandler( ) Number TRUE if inside an event handler
|
||||||
executable( {expr}) Number 1 if executable {expr} exists
|
executable( {expr}) Number 1 if executable {expr} exists
|
||||||
exists( {expr}) Number TRUE if {expr} exists
|
exists( {expr}) Number TRUE if {expr} exists
|
||||||
@ -1597,6 +1597,7 @@ synIDattr( {synID}, {what} [, {mode}])
|
|||||||
String attribute {what} of syntax ID {synID}
|
String attribute {what} of syntax ID {synID}
|
||||||
synIDtrans( {synID}) Number translated syntax ID of {synID}
|
synIDtrans( {synID}) Number translated syntax ID of {synID}
|
||||||
system( {expr} [, {input}]) String output of shell command/filter {expr}
|
system( {expr} [, {input}]) String output of shell command/filter {expr}
|
||||||
|
taglist({expr}) List list of tags matching {expr}
|
||||||
tempname() String name for a temporary file
|
tempname() String name for a temporary file
|
||||||
tolower( {expr}) String the String {expr} switched to lowercase
|
tolower( {expr}) String the String {expr} switched to lowercase
|
||||||
toupper( {expr}) String the String {expr} switched to uppercase
|
toupper( {expr}) String the String {expr} switched to uppercase
|
||||||
@ -2494,7 +2495,7 @@ getfperm({fname}) *getfperm()*
|
|||||||
:echo getfperm("/etc/passwd")
|
:echo getfperm("/etc/passwd")
|
||||||
< This will hopefully (from a security point of view) display
|
< This will hopefully (from a security point of view) display
|
||||||
the string "rw-r--r--" or even "rw-------".
|
the string "rw-r--r--" or even "rw-------".
|
||||||
|
|
||||||
getftime({fname}) *getftime()*
|
getftime({fname}) *getftime()*
|
||||||
The result is a Number, which is the last modification time of
|
The result is a Number, which is the last modification time of
|
||||||
the given file {fname}. The value is measured as seconds
|
the given file {fname}. The value is measured as seconds
|
||||||
@ -3706,7 +3707,7 @@ stridx({haystack}, {needle} [, {start}]) *stridx()*
|
|||||||
:let comma1 = stridx(line, ",")
|
:let comma1 = stridx(line, ",")
|
||||||
:let comma2 = stridx(line, ",", comma1 + 1)
|
:let comma2 = stridx(line, ",", comma1 + 1)
|
||||||
< The search is done case-sensitive.
|
< The search is done case-sensitive.
|
||||||
For pattern searches use |match()|.
|
For pattern searches use |match()|.
|
||||||
-1 is returned if the {needle} does not occur in {haystack}.
|
-1 is returned if the {needle} does not occur in {haystack}.
|
||||||
See also |strridx()|.
|
See also |strridx()|.
|
||||||
Examples: >
|
Examples: >
|
||||||
@ -3852,6 +3853,7 @@ synIDattr({synID}, {what} [, {mode}]) *synIDattr()*
|
|||||||
"reverse" "1" if reverse
|
"reverse" "1" if reverse
|
||||||
"inverse" "1" if inverse (= reverse)
|
"inverse" "1" if inverse (= reverse)
|
||||||
"underline" "1" if underlined
|
"underline" "1" if underlined
|
||||||
|
"undercurl" "1" if undercurled
|
||||||
|
|
||||||
Example (echoes the color of the syntax item under the
|
Example (echoes the color of the syntax item under the
|
||||||
cursor): >
|
cursor): >
|
||||||
@ -3891,6 +3893,39 @@ system({expr} [, {input}]) *system()* *E677*
|
|||||||
Unlike ":!cmd" there is no automatic check for changed files.
|
Unlike ":!cmd" there is no automatic check for changed files.
|
||||||
Use |:checktime| to force a check.
|
Use |:checktime| to force a check.
|
||||||
|
|
||||||
|
|
||||||
|
taglist({expr}) *taglist()*
|
||||||
|
Returns a list of tags matching the regular expression {expr}.
|
||||||
|
Each list item is a dictionary with the following entries:
|
||||||
|
name name of the tag.
|
||||||
|
filename name of the file where the tag is
|
||||||
|
defined.
|
||||||
|
cmd Ex command used to locate the tag in
|
||||||
|
the file.
|
||||||
|
kind type of the tag. The value for this
|
||||||
|
entry depends on the language specific
|
||||||
|
kind values generated by the ctags
|
||||||
|
tool.
|
||||||
|
static a file specific tag. Refer to
|
||||||
|
|static-tag| for more information.
|
||||||
|
More entries may be present, depending on the content of the
|
||||||
|
tags file: access, implementation, inherits and signature.
|
||||||
|
Refer to the ctags documentation for information about these
|
||||||
|
fields. For C code the fields "struct", "class" and "enum"
|
||||||
|
may appear, they give the name of the entity the tag is
|
||||||
|
contained in.
|
||||||
|
|
||||||
|
If there are no matching tags, then an empty list is returned.
|
||||||
|
|
||||||
|
To get an exact tag match, the anchors '^' and '$' should be
|
||||||
|
used in {expr}. Refer to |tag-regexp| for more information
|
||||||
|
about the tag search regular expression pattern.
|
||||||
|
|
||||||
|
Refer to |'tags'| for information about how the tags file is
|
||||||
|
located by Vim. Refer to |tags-file-format| for the format of
|
||||||
|
the tags file generated by the different ctags tools.
|
||||||
|
|
||||||
|
|
||||||
tempname() *tempname()* *temp-file-name*
|
tempname() *tempname()* *temp-file-name*
|
||||||
The result is a String, which is the name of a file that
|
The result is a String, which is the name of a file that
|
||||||
doesn't exist. It can be used for a temporary file. The name
|
doesn't exist. It can be used for a temporary file. The name
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*options.txt* For Vim version 7.0aa. Last change: 2005 Mar 10
|
*options.txt* For Vim version 7.0aa. Last change: 2005 Mar 14
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -3356,6 +3356,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||||||
b bold (termcap entry "md" and "me")
|
b bold (termcap entry "md" and "me")
|
||||||
s standout (termcap entry "so" and "se")
|
s standout (termcap entry "so" and "se")
|
||||||
u underline (termcap entry "us" and "ue")
|
u underline (termcap entry "us" and "ue")
|
||||||
|
c undercurl (termcap entry "Cs" and "Ce")
|
||||||
n no highlighting
|
n no highlighting
|
||||||
- no highlighting
|
- no highlighting
|
||||||
: use a highlight group
|
: use a highlight group
|
||||||
|
@ -767,7 +767,9 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
|
|||||||
't_AL' term.txt /*'t_AL'*
|
't_AL' term.txt /*'t_AL'*
|
||||||
't_CS' term.txt /*'t_CS'*
|
't_CS' term.txt /*'t_CS'*
|
||||||
't_CV' term.txt /*'t_CV'*
|
't_CV' term.txt /*'t_CV'*
|
||||||
|
't_Ce' term.txt /*'t_Ce'*
|
||||||
't_Co' term.txt /*'t_Co'*
|
't_Co' term.txt /*'t_Co'*
|
||||||
|
't_Cs' term.txt /*'t_Cs'*
|
||||||
't_DL' term.txt /*'t_DL'*
|
't_DL' term.txt /*'t_DL'*
|
||||||
't_EI' term.txt /*'t_EI'*
|
't_EI' term.txt /*'t_EI'*
|
||||||
't_F1' term.txt /*'t_F1'*
|
't_F1' term.txt /*'t_F1'*
|
||||||
@ -5093,6 +5095,7 @@ hebrew hebrew.txt /*hebrew*
|
|||||||
hebrew.txt hebrew.txt /*hebrew.txt*
|
hebrew.txt hebrew.txt /*hebrew.txt*
|
||||||
help various.txt /*help*
|
help various.txt /*help*
|
||||||
help-context help.txt /*help-context*
|
help-context help.txt /*help-context*
|
||||||
|
help-tags tags 1
|
||||||
help-translated various.txt /*help-translated*
|
help-translated various.txt /*help-translated*
|
||||||
help-xterm-window various.txt /*help-xterm-window*
|
help-xterm-window various.txt /*help-xterm-window*
|
||||||
help.txt help.txt /*help.txt*
|
help.txt help.txt /*help.txt*
|
||||||
@ -5112,6 +5115,7 @@ highlight-groups syntax.txt /*highlight-groups*
|
|||||||
highlight-gui syntax.txt /*highlight-gui*
|
highlight-gui syntax.txt /*highlight-gui*
|
||||||
highlight-guibg syntax.txt /*highlight-guibg*
|
highlight-guibg syntax.txt /*highlight-guibg*
|
||||||
highlight-guifg syntax.txt /*highlight-guifg*
|
highlight-guifg syntax.txt /*highlight-guifg*
|
||||||
|
highlight-guisp syntax.txt /*highlight-guisp*
|
||||||
highlight-start syntax.txt /*highlight-start*
|
highlight-start syntax.txt /*highlight-start*
|
||||||
highlight-stop syntax.txt /*highlight-stop*
|
highlight-stop syntax.txt /*highlight-stop*
|
||||||
highlight-term syntax.txt /*highlight-term*
|
highlight-term syntax.txt /*highlight-term*
|
||||||
@ -6297,7 +6301,9 @@ t_AF term.txt /*t_AF*
|
|||||||
t_AL term.txt /*t_AL*
|
t_AL term.txt /*t_AL*
|
||||||
t_CS term.txt /*t_CS*
|
t_CS term.txt /*t_CS*
|
||||||
t_CV term.txt /*t_CV*
|
t_CV term.txt /*t_CV*
|
||||||
|
t_Ce term.txt /*t_Ce*
|
||||||
t_Co term.txt /*t_Co*
|
t_Co term.txt /*t_Co*
|
||||||
|
t_Cs term.txt /*t_Cs*
|
||||||
t_DL term.txt /*t_DL*
|
t_DL term.txt /*t_DL*
|
||||||
t_EI term.txt /*t_EI*
|
t_EI term.txt /*t_EI*
|
||||||
t_F1 term.txt /*t_F1*
|
t_F1 term.txt /*t_F1*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*usr_10.txt* For Vim version 7.0aa. Last change: 2004 Mar 12
|
*usr_10.txt* For Vim version 7.0aa. Last change: 2005 Mar 15
|
||||||
|
|
||||||
VIM USER MANUAL - by Bram Moolenaar
|
VIM USER MANUAL - by Bram Moolenaar
|
||||||
|
|
||||||
@ -437,7 +437,8 @@ If the string you insert contains a newline, the "I" acts just like a Normal
|
|||||||
insert command and affects only the first line of the block.
|
insert command and affects only the first line of the block.
|
||||||
|
|
||||||
The "A" command works the same way, except that it appends after the right
|
The "A" command works the same way, except that it appends after the right
|
||||||
side of the block.
|
side of the block. And it does insert text in a short line. Thus you can
|
||||||
|
make a choice whether you do or don't want to append text to a short line.
|
||||||
There is one special case for "A": Select a Visual block and then use "$"
|
There is one special case for "A": Select a Visual block and then use "$"
|
||||||
to make the block extend to the end of each line. Using "A" now will append
|
to make the block extend to the end of each line. Using "A" now will append
|
||||||
the text to the end of each line.
|
the text to the end of each line.
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
" You can also use this as a start for your own set of menus.
|
" You can also use this as a start for your own set of menus.
|
||||||
"
|
"
|
||||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||||
" Last Change: 2005 Feb 24
|
" Last Change: 2005 Mar 15
|
||||||
|
|
||||||
" Note that ":an" (short for ":anoremenu") is often used to make a menu work
|
" Note that ":an" (short for ":anoremenu") is often used to make a menu work
|
||||||
" in all modes and avoid side effects from mappings defined by the user.
|
" in all modes and avoid side effects from mappings defined by the user.
|
||||||
@ -56,9 +56,9 @@ if exists("v:lang") || &langmenu != ""
|
|||||||
let s:lang = substitute(s:lang, '\.[^.]*', "", "")
|
let s:lang = substitute(s:lang, '\.[^.]*', "", "")
|
||||||
exe "runtime! lang/menu_" . s:lang . "[^a-z]*vim"
|
exe "runtime! lang/menu_" . s:lang . "[^a-z]*vim"
|
||||||
|
|
||||||
if !exists("did_menu_trans") && strlen($LANG) > 1
|
if !exists("did_menu_trans") && strlen($LANG) > 1 && s:lang !~ '^en_us'
|
||||||
" On windows locale names are complicated, try using $LANG, it might
|
" On windows locale names are complicated, try using $LANG, it might
|
||||||
" have been set by set_init_1().
|
" have been set by set_init_1(). But don't do this for "en" or "en_us".
|
||||||
" But don't match "slovak" when $LANG is "sl".
|
" But don't match "slovak" when $LANG is "sl".
|
||||||
exe "runtime! lang/menu_" . tolower($LANG) . "[^a-z]*vim"
|
exe "runtime! lang/menu_" . tolower($LANG) . "[^a-z]*vim"
|
||||||
endif
|
endif
|
||||||
@ -854,28 +854,13 @@ if has("toolbar")
|
|||||||
|
|
||||||
if !has("gui_athena")
|
if !has("gui_athena")
|
||||||
an 1.95 ToolBar.-sep3- <Nop>
|
an 1.95 ToolBar.-sep3- <Nop>
|
||||||
an 1.100 ToolBar.Find :promptfind<CR>
|
an 1.100 ToolBar.Replace :promptrepl<CR>
|
||||||
vunmenu ToolBar.Find
|
|
||||||
vnoremenu ToolBar.Find y:promptfind <C-R>"<CR>
|
|
||||||
an 1.110 ToolBar.FindNext n
|
|
||||||
an 1.120 ToolBar.FindPrev N
|
|
||||||
an 1.130 ToolBar.Replace :promptrepl<CR>
|
|
||||||
vunmenu ToolBar.Replace
|
vunmenu ToolBar.Replace
|
||||||
vnoremenu ToolBar.Replace y:promptrepl <C-R>"<CR>
|
vnoremenu ToolBar.Replace y:promptrepl <C-R>"<CR>
|
||||||
|
an 1.110 ToolBar.FindNext n
|
||||||
|
an 1.120 ToolBar.FindPrev N
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if 0 " disabled; These are in the Windows menu
|
|
||||||
an 1.135 ToolBar.-sep4- <Nop>
|
|
||||||
an 1.140 ToolBar.New <C-W>n
|
|
||||||
an 1.150 ToolBar.WinSplit <C-W>s
|
|
||||||
an 1.160 ToolBar.WinMax :resize 200<CR>
|
|
||||||
an 1.170 ToolBar.WinMin :resize 1<CR>
|
|
||||||
an 1.180 ToolBar.WinVSplit <C-W>v
|
|
||||||
an 1.190 ToolBar.WinMaxWidth <C-W>500>
|
|
||||||
an 1.200 ToolBar.WinMinWidth <C-W>1\|
|
|
||||||
an 1.210 ToolBar.WinClose :close<CR>
|
|
||||||
endif
|
|
||||||
|
|
||||||
an 1.215 ToolBar.-sep5- <Nop>
|
an 1.215 ToolBar.-sep5- <Nop>
|
||||||
an <silent> 1.220 ToolBar.LoadSesn :call <SID>LoadVimSesn()<CR>
|
an <silent> 1.220 ToolBar.LoadSesn :call <SID>LoadVimSesn()<CR>
|
||||||
an <silent> 1.230 ToolBar.SaveSesn :call <SID>SaveVimSesn()<CR>
|
an <silent> 1.230 ToolBar.SaveSesn :call <SID>SaveVimSesn()<CR>
|
||||||
@ -910,21 +895,11 @@ else
|
|||||||
tmenu ToolBar.FindPrev Find Previous
|
tmenu ToolBar.FindPrev Find Previous
|
||||||
tmenu ToolBar.Replace Find / Replace...
|
tmenu ToolBar.Replace Find / Replace...
|
||||||
endif
|
endif
|
||||||
if 0 " disabled; These are in the Windows menu
|
tmenu ToolBar.LoadSesn Chose a session to load
|
||||||
tmenu ToolBar.New New Window
|
|
||||||
tmenu ToolBar.WinSplit Split Window
|
|
||||||
tmenu ToolBar.WinMax Maximise Window
|
|
||||||
tmenu ToolBar.WinMin Minimise Window
|
|
||||||
tmenu ToolBar.WinVSplit Split Window Vertically
|
|
||||||
tmenu ToolBar.WinMaxWidth Maximise Window Width
|
|
||||||
tmenu ToolBar.WinMinWidth Minimise Window Width
|
|
||||||
tmenu ToolBar.WinClose Close Window
|
|
||||||
endif
|
|
||||||
tmenu ToolBar.LoadSesn Load session
|
|
||||||
tmenu ToolBar.SaveSesn Save current session
|
tmenu ToolBar.SaveSesn Save current session
|
||||||
tmenu ToolBar.RunScript Run a Vim Script
|
tmenu ToolBar.RunScript Chose a Vim Script to run
|
||||||
tmenu ToolBar.Make Make current project
|
tmenu ToolBar.Make Make current project (:make)
|
||||||
tmenu ToolBar.RunCtags Build tags in current directory tree
|
tmenu ToolBar.RunCtags Build tags in current directory tree (!ctags -R .)
|
||||||
tmenu ToolBar.TagJump Jump to tag under cursor
|
tmenu ToolBar.TagJump Jump to tag under cursor
|
||||||
tmenu ToolBar.Help Vim Help
|
tmenu ToolBar.Help Vim Help
|
||||||
tmenu ToolBar.FindHelp Search Vim Help
|
tmenu ToolBar.FindHelp Search Vim Help
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
" Vim tutor support file
|
" Vim tutor support file
|
||||||
" Author: Eduardo F. Amatria <eferna1@platea.pntic.mec.es>
|
" Author: Eduardo F. Amatria <eferna1@platea.pntic.mec.es>
|
||||||
" Last Change: 2004 Sep 06
|
" Last Change: 2005 Mar 15
|
||||||
|
|
||||||
" This small source file is used for detecting if a translation of the
|
" This small source file is used for detecting if a translation of the
|
||||||
" tutor file exist, i.e., a tutor.xx file, where xx is the language.
|
" tutor file exist, i.e., a tutor.xx file, where xx is the language.
|
||||||
@ -15,11 +15,16 @@ if strlen($xx) > 1
|
|||||||
let s:ext = "." . $xx
|
let s:ext = "." . $xx
|
||||||
else
|
else
|
||||||
let s:lang = ""
|
let s:lang = ""
|
||||||
if exists("v:lang") && v:lang != "C"
|
if exists("v:lang")
|
||||||
let s:lang = v:lang
|
let s:lang = v:lang
|
||||||
elseif strlen($LANG) > 0 && $LANG != "C"
|
elseif strlen($LC_ALL) > 0
|
||||||
|
let s:lang = $LC_ALL
|
||||||
|
elseif strlen($LANG) > 0
|
||||||
let s:lang = $LANG
|
let s:lang = $LANG
|
||||||
endif
|
endif
|
||||||
|
if s:lang == "C"
|
||||||
|
let s:lang = ""
|
||||||
|
endif
|
||||||
if s:lang != ""
|
if s:lang != ""
|
||||||
" Remove "@euro" (ignoring case), it may be at the end
|
" Remove "@euro" (ignoring case), it may be at the end
|
||||||
let s:lang = substitute(s:lang, '\c@euro', '', '')
|
let s:lang = substitute(s:lang, '\c@euro', '', '')
|
||||||
|
@ -3125,11 +3125,11 @@ getsourceline(c, cookie, indent)
|
|||||||
line = sp->nextline;
|
line = sp->nextline;
|
||||||
sp->nextline = NULL;
|
sp->nextline = NULL;
|
||||||
++sourcing_lnum;
|
++sourcing_lnum;
|
||||||
#ifdef FEAT_PROFILE
|
|
||||||
if (do_profiling)
|
|
||||||
script_line_start();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#ifdef FEAT_PROFILE
|
||||||
|
if (line != NULL && do_profiling)
|
||||||
|
script_line_start();
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Only concatenate lines starting with a \ when 'cpoptions' doesn't
|
/* Only concatenate lines starting with a \ when 'cpoptions' doesn't
|
||||||
* contain the 'C' flag. */
|
* contain the 'C' flag. */
|
||||||
@ -3684,7 +3684,7 @@ prt_get_term_color(colorindex)
|
|||||||
static void
|
static void
|
||||||
prt_get_attr(hl_id, pattr, modec)
|
prt_get_attr(hl_id, pattr, modec)
|
||||||
int hl_id;
|
int hl_id;
|
||||||
prt_text_attr_T* pattr;
|
prt_text_attr_T *pattr;
|
||||||
int modec;
|
int modec;
|
||||||
{
|
{
|
||||||
int colorindex;
|
int colorindex;
|
||||||
@ -3695,6 +3695,7 @@ prt_get_attr(hl_id, pattr, modec)
|
|||||||
pattr->bold = (highlight_has_attr(hl_id, HL_BOLD, modec) != NULL);
|
pattr->bold = (highlight_has_attr(hl_id, HL_BOLD, modec) != NULL);
|
||||||
pattr->italic = (highlight_has_attr(hl_id, HL_ITALIC, modec) != NULL);
|
pattr->italic = (highlight_has_attr(hl_id, HL_ITALIC, modec) != NULL);
|
||||||
pattr->underline = (highlight_has_attr(hl_id, HL_UNDERLINE, modec) != NULL);
|
pattr->underline = (highlight_has_attr(hl_id, HL_UNDERLINE, modec) != NULL);
|
||||||
|
pattr->undercurl = (highlight_has_attr(hl_id, HL_UNDERCURL, modec) != NULL);
|
||||||
|
|
||||||
# ifdef FEAT_GUI
|
# ifdef FEAT_GUI
|
||||||
if (gui.in_use)
|
if (gui.in_use)
|
||||||
|
@ -839,6 +839,15 @@ gui_mch_set_bg_color(guicolor_T color)//{{{
|
|||||||
gui.w->painter->setBackgroundColor(rgb);
|
gui.w->painter->setBackgroundColor(rgb);
|
||||||
}//}}}
|
}//}}}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Set the current text special color.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
gui_mch_set_sp_color(guicolor_T color)//{{{
|
||||||
|
{
|
||||||
|
/* TODO */
|
||||||
|
}//}}}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Use the blank mouse pointer or not.
|
* Use the blank mouse pointer or not.
|
||||||
*
|
*
|
||||||
|
@ -2113,6 +2113,11 @@ gui_mch_set_bg_color(guicolor_T color)
|
|||||||
PgSetFillColor( color );
|
PgSetFillColor( color );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gui_mch_set_sp_color(guicolor_T color)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gui_mch_invert_rectangle(int row, int col, int nr, int nc)
|
gui_mch_invert_rectangle(int row, int col, int nr, int nc)
|
||||||
{
|
{
|
||||||
|
@ -1400,6 +1400,15 @@ gui_mch_set_bg_color(guicolor_T color)
|
|||||||
gui.currBgColor = color;
|
gui.currBgColor = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Set the current text special color.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
gui_mch_set_sp_color(guicolor_T color)
|
||||||
|
{
|
||||||
|
gui.currSpColor = color;
|
||||||
|
}
|
||||||
|
|
||||||
#if defined(FEAT_MBYTE) && defined(FEAT_MBYTE_IME)
|
#if defined(FEAT_MBYTE) && defined(FEAT_MBYTE_IME)
|
||||||
/*
|
/*
|
||||||
* Multi-byte handling, originally by Sung-Hoon Baek.
|
* Multi-byte handling, originally by Sung-Hoon Baek.
|
||||||
@ -2013,6 +2022,7 @@ gui_mch_draw_string(
|
|||||||
foptions, pcliprect, (char *)text, len, padding);
|
foptions, pcliprect, (char *)text, len, padding);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Underline */
|
||||||
if (flags & DRAW_UNDERL)
|
if (flags & DRAW_UNDERL)
|
||||||
{
|
{
|
||||||
hpen = CreatePen(PS_SOLID, 1, gui.currFgColor);
|
hpen = CreatePen(PS_SOLID, 1, gui.currFgColor);
|
||||||
@ -2029,6 +2039,21 @@ gui_mch_draw_string(
|
|||||||
LineTo(s_hdc, FILL_X(col + len), y);
|
LineTo(s_hdc, FILL_X(col + len), y);
|
||||||
DeleteObject(SelectObject(s_hdc, old_pen));
|
DeleteObject(SelectObject(s_hdc, old_pen));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Undercurl */
|
||||||
|
if (flags & DRAW_UNDERC)
|
||||||
|
{
|
||||||
|
int x;
|
||||||
|
int offset;
|
||||||
|
const static int val[8] = {1, 0, 0, 0, 1, 2, 2, 2 };
|
||||||
|
|
||||||
|
y = FILL_Y(row + 1) - 1;
|
||||||
|
for (x = FILL_X(col); x < FILL_X(col + len); ++x)
|
||||||
|
{
|
||||||
|
offset = val[x % 8];
|
||||||
|
SetPixel(s_hdc, x, y - offset, gui.currSpColor);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -4045,7 +4070,7 @@ BevalTimerProc(hwnd, uMsg, idEvent, dwTime)
|
|||||||
cur_beval->x = pt.x;
|
cur_beval->x = pt.x;
|
||||||
cur_beval->y = pt.y;
|
cur_beval->y = pt.y;
|
||||||
|
|
||||||
TRACE0("BevalTimerProc: sending request");
|
// TRACE0("BevalTimerProc: sending request");
|
||||||
|
|
||||||
if (cur_beval->msgCB != NULL)
|
if (cur_beval->msgCB != NULL)
|
||||||
(*cur_beval->msgCB)(cur_beval, 0);
|
(*cur_beval->msgCB)(cur_beval, 0);
|
||||||
@ -4056,22 +4081,22 @@ BevalTimerProc(hwnd, uMsg, idEvent, dwTime)
|
|||||||
gui_mch_disable_beval_area(beval)
|
gui_mch_disable_beval_area(beval)
|
||||||
BalloonEval *beval;
|
BalloonEval *beval;
|
||||||
{
|
{
|
||||||
TRACE0("gui_mch_disable_beval_area {{{");
|
// TRACE0("gui_mch_disable_beval_area {{{");
|
||||||
KillTimer(s_textArea, BevalTimerId);
|
KillTimer(s_textArea, BevalTimerId);
|
||||||
TRACE0("gui_mch_disable_beval_area }}}");
|
// TRACE0("gui_mch_disable_beval_area }}}");
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gui_mch_enable_beval_area(beval)
|
gui_mch_enable_beval_area(beval)
|
||||||
BalloonEval *beval;
|
BalloonEval *beval;
|
||||||
{
|
{
|
||||||
TRACE0("gui_mch_enable_beval_area |||");
|
// TRACE0("gui_mch_enable_beval_area |||");
|
||||||
if (beval == NULL)
|
if (beval == NULL)
|
||||||
return;
|
return;
|
||||||
TRACE0("gui_mch_enable_beval_area {{{");
|
// TRACE0("gui_mch_enable_beval_area {{{");
|
||||||
BevalTimerId = SetTimer(s_textArea, 0, p_bdlay / 2,
|
BevalTimerId = SetTimer(s_textArea, 0, p_bdlay / 2,
|
||||||
(TIMERPROC)BevalTimerProc);
|
(TIMERPROC)BevalTimerProc);
|
||||||
TRACE0("gui_mch_enable_beval_area }}}");
|
// TRACE0("gui_mch_enable_beval_area }}}");
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -4080,7 +4105,7 @@ gui_mch_post_balloon(beval, mesg)
|
|||||||
char_u *mesg;
|
char_u *mesg;
|
||||||
{
|
{
|
||||||
POINT pt;
|
POINT pt;
|
||||||
TRACE0("gui_mch_post_balloon {{{");
|
// TRACE0("gui_mch_post_balloon {{{");
|
||||||
if (beval->showState == ShS_SHOWING)
|
if (beval->showState == ShS_SHOWING)
|
||||||
return;
|
return;
|
||||||
GetCursorPos(&pt);
|
GetCursorPos(&pt);
|
||||||
@ -4093,7 +4118,7 @@ gui_mch_post_balloon(beval, mesg)
|
|||||||
beval->showState = ShS_SHOWING;
|
beval->showState = ShS_SHOWING;
|
||||||
make_tooltip(beval, mesg, pt);
|
make_tooltip(beval, mesg, pt);
|
||||||
}
|
}
|
||||||
TRACE0("gui_mch_post_balloon }}}");
|
// TRACE0("gui_mch_post_balloon }}}");
|
||||||
}
|
}
|
||||||
|
|
||||||
BalloonEval *
|
BalloonEval *
|
||||||
@ -4148,15 +4173,15 @@ Handle_WM_Notify(hwnd, pnmh)
|
|||||||
{
|
{
|
||||||
if (pnmh->code == TTN_SHOW)
|
if (pnmh->code == TTN_SHOW)
|
||||||
{
|
{
|
||||||
TRACE0("TTN_SHOW {{{");
|
// TRACE0("TTN_SHOW {{{");
|
||||||
TRACE0("TTN_SHOW }}}");
|
// TRACE0("TTN_SHOW }}}");
|
||||||
}
|
}
|
||||||
else if (pnmh->code == TTN_POP) /* Before tooltip disappear */
|
else if (pnmh->code == TTN_POP) /* Before tooltip disappear */
|
||||||
{
|
{
|
||||||
TRACE0("TTN_POP {{{");
|
// TRACE0("TTN_POP {{{");
|
||||||
delete_tooltip(cur_beval);
|
delete_tooltip(cur_beval);
|
||||||
gui_mch_enable_beval_area(cur_beval);
|
gui_mch_enable_beval_area(cur_beval);
|
||||||
TRACE0("TTN_POP }}}");
|
// TRACE0("TTN_POP }}}");
|
||||||
|
|
||||||
cur_beval->showState = ShS_NEUTRAL;
|
cur_beval->showState = ShS_NEUTRAL;
|
||||||
}
|
}
|
||||||
|
13
src/ops.c
13
src/ops.c
@ -2888,7 +2888,18 @@ op_yank(oap, deleting, mess)
|
|||||||
/* redisplay now, so message is not deleted */
|
/* redisplay now, so message is not deleted */
|
||||||
update_topline_redraw();
|
update_topline_redraw();
|
||||||
if (yanklines == 1)
|
if (yanklines == 1)
|
||||||
MSG(_("1 line yanked"));
|
{
|
||||||
|
#ifdef FEAT_VISUAL
|
||||||
|
if (oap->block_mode)
|
||||||
|
MSG(_("block of 1 line yanked"));
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
MSG(_("1 line yanked"));
|
||||||
|
}
|
||||||
|
#ifdef FEAT_VISUAL
|
||||||
|
else if (oap->block_mode)
|
||||||
|
smsg((char_u *)_("block of %ld lines yanked"), yanklines);
|
||||||
|
#endif
|
||||||
else
|
else
|
||||||
smsg((char_u *)_("%ld lines yanked"), yanklines);
|
smsg((char_u *)_("%ld lines yanked"), yanklines);
|
||||||
}
|
}
|
||||||
|
@ -5870,7 +5870,8 @@ screen_start_highlight(attr)
|
|||||||
out_str(T_MD);
|
out_str(T_MD);
|
||||||
if ((attr & HL_STANDOUT) && T_SO != NULL) /* standout */
|
if ((attr & HL_STANDOUT) && T_SO != NULL) /* standout */
|
||||||
out_str(T_SO);
|
out_str(T_SO);
|
||||||
if ((attr & HL_UNDERLINE) && T_US != NULL) /* underline */
|
if ((attr & (HL_UNDERLINE | HL_UNDERCURL)) && T_US != NULL)
|
||||||
|
/* underline or undercurl */
|
||||||
out_str(T_US);
|
out_str(T_US);
|
||||||
if ((attr & HL_ITALIC) && T_CZH != NULL) /* italic */
|
if ((attr & HL_ITALIC) && T_CZH != NULL) /* italic */
|
||||||
out_str(T_CZH);
|
out_str(T_CZH);
|
||||||
@ -5965,7 +5966,7 @@ screen_stop_highlight()
|
|||||||
else
|
else
|
||||||
out_str(T_SE);
|
out_str(T_SE);
|
||||||
}
|
}
|
||||||
if (screen_attr & HL_UNDERLINE)
|
if (screen_attr & (HL_UNDERLINE | HL_UNDERCURL))
|
||||||
{
|
{
|
||||||
if (STRCMP(T_UE, T_ME) == 0)
|
if (STRCMP(T_UE, T_ME) == 0)
|
||||||
do_ME = TRUE;
|
do_ME = TRUE;
|
||||||
@ -6856,7 +6857,7 @@ windgoto(row, col)
|
|||||||
int row;
|
int row;
|
||||||
int col;
|
int col;
|
||||||
{
|
{
|
||||||
char_u *p;
|
sattr_T *p;
|
||||||
int i;
|
int i;
|
||||||
int plan;
|
int plan;
|
||||||
int cost;
|
int cost;
|
||||||
|
@ -778,6 +778,7 @@ typedef struct attr_entry
|
|||||||
{
|
{
|
||||||
guicolor_T fg_color; /* foreground color handle */
|
guicolor_T fg_color; /* foreground color handle */
|
||||||
guicolor_T bg_color; /* background color handle */
|
guicolor_T bg_color; /* background color handle */
|
||||||
|
guicolor_T sp_color; /* special color handle */
|
||||||
GuiFont font; /* font handle */
|
GuiFont font; /* font handle */
|
||||||
# ifdef FEAT_XFONTSET
|
# ifdef FEAT_XFONTSET
|
||||||
GuiFontset fontset; /* fontset handle */
|
GuiFontset fontset; /* fontset handle */
|
||||||
@ -2055,6 +2056,7 @@ typedef struct
|
|||||||
int bold;
|
int bold;
|
||||||
int italic;
|
int italic;
|
||||||
int underline;
|
int underline;
|
||||||
|
int undercurl;
|
||||||
} prt_text_attr_T;
|
} prt_text_attr_T;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
165
src/syntax.c
165
src/syntax.c
@ -40,6 +40,8 @@ struct hl_group
|
|||||||
char_u *sg_gui_fg_name;/* GUI foreground color name */
|
char_u *sg_gui_fg_name;/* GUI foreground color name */
|
||||||
guicolor_T sg_gui_bg; /* GUI background color handle */
|
guicolor_T sg_gui_bg; /* GUI background color handle */
|
||||||
char_u *sg_gui_bg_name;/* GUI background color name */
|
char_u *sg_gui_bg_name;/* GUI background color name */
|
||||||
|
guicolor_T sg_gui_sp; /* GUI special color handle */
|
||||||
|
char_u *sg_gui_sp_name;/* GUI special color name */
|
||||||
GuiFont sg_font; /* GUI font handle */
|
GuiFont sg_font; /* GUI font handle */
|
||||||
#ifdef FEAT_XFONTSET
|
#ifdef FEAT_XFONTSET
|
||||||
GuiFontset sg_fontset; /* GUI fontset handle */
|
GuiFontset sg_fontset; /* GUI fontset handle */
|
||||||
@ -70,9 +72,10 @@ static int include_link = FALSE; /* include "link" for expansion */
|
|||||||
* following names, separated by commas (but no spaces!).
|
* following names, separated by commas (but no spaces!).
|
||||||
*/
|
*/
|
||||||
static char *(hl_name_table[]) =
|
static char *(hl_name_table[]) =
|
||||||
{"bold", "standout", "underline", "italic", "reverse", "inverse", "NONE"};
|
{"bold", "standout", "underline", "undercurl",
|
||||||
|
"italic", "reverse", "inverse", "NONE"};
|
||||||
static int hl_attr_table[] =
|
static int hl_attr_table[] =
|
||||||
{HL_BOLD, HL_STANDOUT, HL_UNDERLINE, HL_ITALIC, HL_INVERSE, HL_INVERSE, 0};
|
{HL_BOLD, HL_STANDOUT, HL_UNDERLINE, HL_UNDERCURL, HL_ITALIC, HL_INVERSE, HL_INVERSE, 0};
|
||||||
|
|
||||||
static int get_attr_entry __ARGS((garray_T *table, attrentry_T *aep));
|
static int get_attr_entry __ARGS((garray_T *table, attrentry_T *aep));
|
||||||
static void syn_unadd_group __ARGS((void));
|
static void syn_unadd_group __ARGS((void));
|
||||||
@ -1848,7 +1851,7 @@ syn_current_attr(syncing, displaying)
|
|||||||
{
|
{
|
||||||
syn_id = check_keyword_id(line, (int)current_col,
|
syn_id = check_keyword_id(line, (int)current_col,
|
||||||
&endcol, &flags, &next_list, cur_si);
|
&endcol, &flags, &next_list, cur_si);
|
||||||
if (syn_id)
|
if (syn_id != 0)
|
||||||
{
|
{
|
||||||
if (push_current_state(KEYWORD_IDX) == OK)
|
if (push_current_state(KEYWORD_IDX) == OK)
|
||||||
{
|
{
|
||||||
@ -1893,7 +1896,7 @@ syn_current_attr(syncing, displaying)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 3. Check for patterns (only if not found a keyword).
|
* 3. Check for patterns (only if no keyword found).
|
||||||
*/
|
*/
|
||||||
if (syn_id == 0 && syn_buf->b_syn_patterns.ga_len)
|
if (syn_id == 0 && syn_buf->b_syn_patterns.ga_len)
|
||||||
{
|
{
|
||||||
@ -6758,65 +6761,86 @@ do_highlight(line, forceit, init)
|
|||||||
else if (STRCMP(key, "GUIFG") == 0)
|
else if (STRCMP(key, "GUIFG") == 0)
|
||||||
{
|
{
|
||||||
#ifdef FEAT_GUI /* in non-GUI guifg colors are simply ignored */
|
#ifdef FEAT_GUI /* in non-GUI guifg colors are simply ignored */
|
||||||
if (!init || !(HL_TABLE()[idx].sg_set & SG_GUI))
|
if (!init || !(HL_TABLE()[idx].sg_set & SG_GUI))
|
||||||
{
|
|
||||||
if (!init)
|
|
||||||
HL_TABLE()[idx].sg_set |= SG_GUI;
|
|
||||||
|
|
||||||
i = color_name2handle(arg);
|
|
||||||
if (i != INVALCOLOR || STRCMP(arg, "NONE") == 0 || !gui.in_use)
|
|
||||||
{
|
{
|
||||||
HL_TABLE()[idx].sg_gui_fg = i;
|
if (!init)
|
||||||
vim_free(HL_TABLE()[idx].sg_gui_fg_name);
|
HL_TABLE()[idx].sg_set |= SG_GUI;
|
||||||
if (STRCMP(arg, "NONE"))
|
|
||||||
HL_TABLE()[idx].sg_gui_fg_name = vim_strsave(arg);
|
i = color_name2handle(arg);
|
||||||
else
|
if (i != INVALCOLOR || STRCMP(arg, "NONE") == 0 || !gui.in_use)
|
||||||
HL_TABLE()[idx].sg_gui_fg_name = NULL;
|
{
|
||||||
|
HL_TABLE()[idx].sg_gui_fg = i;
|
||||||
|
vim_free(HL_TABLE()[idx].sg_gui_fg_name);
|
||||||
|
if (STRCMP(arg, "NONE"))
|
||||||
|
HL_TABLE()[idx].sg_gui_fg_name = vim_strsave(arg);
|
||||||
|
else
|
||||||
|
HL_TABLE()[idx].sg_gui_fg_name = NULL;
|
||||||
# ifdef FEAT_GUI_X11
|
# ifdef FEAT_GUI_X11
|
||||||
if (is_menu_group)
|
if (is_menu_group)
|
||||||
gui.menu_fg_pixel = i;
|
gui.menu_fg_pixel = i;
|
||||||
if (is_scrollbar_group)
|
if (is_scrollbar_group)
|
||||||
gui.scroll_fg_pixel = i;
|
gui.scroll_fg_pixel = i;
|
||||||
# ifdef FEAT_BEVAL
|
# ifdef FEAT_BEVAL
|
||||||
if (is_tooltip_group)
|
if (is_tooltip_group)
|
||||||
gui.tooltip_fg_pixel = i;
|
gui.tooltip_fg_pixel = i;
|
||||||
# endif
|
# endif
|
||||||
do_colors = TRUE;
|
do_colors = TRUE;
|
||||||
# endif
|
# endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else if (STRCMP(key, "GUIBG") == 0)
|
else if (STRCMP(key, "GUIBG") == 0)
|
||||||
{
|
{
|
||||||
#ifdef FEAT_GUI /* in non-GUI guibg colors are simply ignored */
|
#ifdef FEAT_GUI /* in non-GUI guibg colors are simply ignored */
|
||||||
if (!init || !(HL_TABLE()[idx].sg_set & SG_GUI))
|
if (!init || !(HL_TABLE()[idx].sg_set & SG_GUI))
|
||||||
{
|
|
||||||
if (!init)
|
|
||||||
HL_TABLE()[idx].sg_set |= SG_GUI;
|
|
||||||
|
|
||||||
i = color_name2handle(arg);
|
|
||||||
if (i != INVALCOLOR || STRCMP(arg, "NONE") == 0 || !gui.in_use)
|
|
||||||
{
|
{
|
||||||
HL_TABLE()[idx].sg_gui_bg = i;
|
if (!init)
|
||||||
vim_free(HL_TABLE()[idx].sg_gui_bg_name);
|
HL_TABLE()[idx].sg_set |= SG_GUI;
|
||||||
if (STRCMP(arg, "NONE"))
|
|
||||||
HL_TABLE()[idx].sg_gui_bg_name = vim_strsave(arg);
|
i = color_name2handle(arg);
|
||||||
else
|
if (i != INVALCOLOR || STRCMP(arg, "NONE") == 0 || !gui.in_use)
|
||||||
HL_TABLE()[idx].sg_gui_bg_name = NULL;
|
{
|
||||||
|
HL_TABLE()[idx].sg_gui_bg = i;
|
||||||
|
vim_free(HL_TABLE()[idx].sg_gui_bg_name);
|
||||||
|
if (STRCMP(arg, "NONE") != 0)
|
||||||
|
HL_TABLE()[idx].sg_gui_bg_name = vim_strsave(arg);
|
||||||
|
else
|
||||||
|
HL_TABLE()[idx].sg_gui_bg_name = NULL;
|
||||||
# ifdef FEAT_GUI_X11
|
# ifdef FEAT_GUI_X11
|
||||||
if (is_menu_group)
|
if (is_menu_group)
|
||||||
gui.menu_bg_pixel = i;
|
gui.menu_bg_pixel = i;
|
||||||
if (is_scrollbar_group)
|
if (is_scrollbar_group)
|
||||||
gui.scroll_bg_pixel = i;
|
gui.scroll_bg_pixel = i;
|
||||||
# ifdef FEAT_BEVAL
|
# ifdef FEAT_BEVAL
|
||||||
if (is_tooltip_group)
|
if (is_tooltip_group)
|
||||||
gui.tooltip_bg_pixel = i;
|
gui.tooltip_bg_pixel = i;
|
||||||
# endif
|
# endif
|
||||||
do_colors = TRUE;
|
do_colors = TRUE;
|
||||||
# endif
|
# endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
else if (STRCMP(key, "GUISP") == 0)
|
||||||
|
{
|
||||||
|
#ifdef FEAT_GUI /* in non-GUI guisp colors are simply ignored */
|
||||||
|
if (!init || !(HL_TABLE()[idx].sg_set & SG_GUI))
|
||||||
|
{
|
||||||
|
if (!init)
|
||||||
|
HL_TABLE()[idx].sg_set |= SG_GUI;
|
||||||
|
|
||||||
|
i = color_name2handle(arg);
|
||||||
|
if (i != INVALCOLOR || STRCMP(arg, "NONE") == 0 || !gui.in_use)
|
||||||
|
{
|
||||||
|
HL_TABLE()[idx].sg_gui_sp = i;
|
||||||
|
vim_free(HL_TABLE()[idx].sg_gui_sp_name);
|
||||||
|
if (STRCMP(arg, "NONE") != 0)
|
||||||
|
HL_TABLE()[idx].sg_gui_sp_name = vim_strsave(arg);
|
||||||
|
else
|
||||||
|
HL_TABLE()[idx].sg_gui_sp_name = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else if (STRCMP(key, "START") == 0 || STRCMP(key, "STOP") == 0)
|
else if (STRCMP(key, "START") == 0 || STRCMP(key, "STOP") == 0)
|
||||||
@ -7035,6 +7059,9 @@ highlight_clear(idx)
|
|||||||
HL_TABLE()[idx].sg_gui_bg = INVALCOLOR;
|
HL_TABLE()[idx].sg_gui_bg = INVALCOLOR;
|
||||||
vim_free(HL_TABLE()[idx].sg_gui_bg_name);
|
vim_free(HL_TABLE()[idx].sg_gui_bg_name);
|
||||||
HL_TABLE()[idx].sg_gui_bg_name = NULL;
|
HL_TABLE()[idx].sg_gui_bg_name = NULL;
|
||||||
|
HL_TABLE()[idx].sg_gui_sp = INVALCOLOR;
|
||||||
|
vim_free(HL_TABLE()[idx].sg_gui_sp_name);
|
||||||
|
HL_TABLE()[idx].sg_gui_sp_name = NULL;
|
||||||
gui_mch_free_font(HL_TABLE()[idx].sg_font);
|
gui_mch_free_font(HL_TABLE()[idx].sg_font);
|
||||||
HL_TABLE()[idx].sg_font = NOFONT;
|
HL_TABLE()[idx].sg_font = NOFONT;
|
||||||
# ifdef FEAT_XFONTSET
|
# ifdef FEAT_XFONTSET
|
||||||
@ -7057,16 +7084,16 @@ highlight_clear(idx)
|
|||||||
set_normal_colors()
|
set_normal_colors()
|
||||||
{
|
{
|
||||||
if (set_group_colors((char_u *)"Normal",
|
if (set_group_colors((char_u *)"Normal",
|
||||||
&gui.norm_pixel, &gui.back_pixel, FALSE, TRUE,
|
&gui.norm_pixel, &gui.back_pixel,
|
||||||
FALSE))
|
FALSE, TRUE, FALSE))
|
||||||
{
|
{
|
||||||
gui_mch_new_colors();
|
gui_mch_new_colors();
|
||||||
must_redraw = CLEAR;
|
must_redraw = CLEAR;
|
||||||
}
|
}
|
||||||
#ifdef FEAT_GUI_X11
|
#ifdef FEAT_GUI_X11
|
||||||
if (set_group_colors((char_u *)"Menu",
|
if (set_group_colors((char_u *)"Menu",
|
||||||
&gui.menu_fg_pixel, &gui.menu_bg_pixel, TRUE, FALSE,
|
&gui.menu_fg_pixel, &gui.menu_bg_pixel,
|
||||||
FALSE))
|
TRUE, FALSE, FALSE))
|
||||||
{
|
{
|
||||||
# ifdef FEAT_MENU
|
# ifdef FEAT_MENU
|
||||||
gui_mch_new_menu_colors();
|
gui_mch_new_menu_colors();
|
||||||
@ -7085,8 +7112,8 @@ set_normal_colors()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (set_group_colors((char_u *)"Scrollbar",
|
if (set_group_colors((char_u *)"Scrollbar",
|
||||||
&gui.scroll_fg_pixel, &gui.scroll_bg_pixel, FALSE, FALSE,
|
&gui.scroll_fg_pixel, &gui.scroll_bg_pixel,
|
||||||
FALSE))
|
FALSE, FALSE, FALSE))
|
||||||
{
|
{
|
||||||
gui_new_scrollbar_colors();
|
gui_new_scrollbar_colors();
|
||||||
must_redraw = CLEAR;
|
must_redraw = CLEAR;
|
||||||
@ -7397,6 +7424,7 @@ get_attr_entry(table, aep)
|
|||||||
(table == &gui_attr_table
|
(table == &gui_attr_table
|
||||||
&& (aep->ae_u.gui.fg_color == gap->ae_u.gui.fg_color
|
&& (aep->ae_u.gui.fg_color == gap->ae_u.gui.fg_color
|
||||||
&& aep->ae_u.gui.bg_color == gap->ae_u.gui.bg_color
|
&& aep->ae_u.gui.bg_color == gap->ae_u.gui.bg_color
|
||||||
|
&& aep->ae_u.gui.sp_color == gap->ae_u.gui.sp_color
|
||||||
&& aep->ae_u.gui.font == gap->ae_u.gui.font
|
&& aep->ae_u.gui.font == gap->ae_u.gui.font
|
||||||
# ifdef FEAT_XFONTSET
|
# ifdef FEAT_XFONTSET
|
||||||
&& aep->ae_u.gui.fontset == gap->ae_u.gui.fontset
|
&& aep->ae_u.gui.fontset == gap->ae_u.gui.fontset
|
||||||
@ -7464,6 +7492,7 @@ get_attr_entry(table, aep)
|
|||||||
{
|
{
|
||||||
gap->ae_u.gui.fg_color = aep->ae_u.gui.fg_color;
|
gap->ae_u.gui.fg_color = aep->ae_u.gui.fg_color;
|
||||||
gap->ae_u.gui.bg_color = aep->ae_u.gui.bg_color;
|
gap->ae_u.gui.bg_color = aep->ae_u.gui.bg_color;
|
||||||
|
gap->ae_u.gui.sp_color = aep->ae_u.gui.sp_color;
|
||||||
gap->ae_u.gui.font = aep->ae_u.gui.font;
|
gap->ae_u.gui.font = aep->ae_u.gui.font;
|
||||||
# ifdef FEAT_XFONTSET
|
# ifdef FEAT_XFONTSET
|
||||||
gap->ae_u.gui.fontset = aep->ae_u.gui.fontset;
|
gap->ae_u.gui.fontset = aep->ae_u.gui.fontset;
|
||||||
@ -7656,21 +7685,24 @@ highlight_has_attr(id, flag, modec)
|
|||||||
char_u *
|
char_u *
|
||||||
highlight_color(id, what, modec)
|
highlight_color(id, what, modec)
|
||||||
int id;
|
int id;
|
||||||
char_u *what; /* "fg", "bg", "fg#" or "bg#" */
|
char_u *what; /* "fg", "bg", "sp", "fg#", "bg#" or "sp#" */
|
||||||
int modec; /* 'g' for GUI, 'c' for cterm, 't' for term */
|
int modec; /* 'g' for GUI, 'c' for cterm, 't' for term */
|
||||||
{
|
{
|
||||||
static char_u name[20];
|
static char_u name[20];
|
||||||
int n;
|
int n;
|
||||||
int fg;
|
int fg = FALSE;
|
||||||
|
# ifdef FEAT_GUI
|
||||||
|
int sp = FALSE;
|
||||||
|
# endif
|
||||||
|
|
||||||
if (id <= 0 || id > highlight_ga.ga_len)
|
if (id <= 0 || id > highlight_ga.ga_len)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (TOLOWER_ASC(what[0]) == 'f')
|
if (TOLOWER_ASC(what[0]) == 'f')
|
||||||
fg = TRUE;
|
fg = TRUE;
|
||||||
else
|
# ifdef FEAT_GUI
|
||||||
fg = FALSE;
|
else if (TOLOWER_ASC(what[0]) == 's')
|
||||||
#ifdef FEAT_GUI
|
sp = TRUE;
|
||||||
if (modec == 'g')
|
if (modec == 'g')
|
||||||
{
|
{
|
||||||
/* return #RRGGBB form (only possible when GUI is running) */
|
/* return #RRGGBB form (only possible when GUI is running) */
|
||||||
@ -7682,6 +7714,8 @@ highlight_color(id, what, modec)
|
|||||||
|
|
||||||
if (fg)
|
if (fg)
|
||||||
color = HL_TABLE()[id - 1].sg_gui_fg;
|
color = HL_TABLE()[id - 1].sg_gui_fg;
|
||||||
|
else if (sp)
|
||||||
|
color = HL_TABLE()[id - 1].sg_gui_sp;
|
||||||
else
|
else
|
||||||
color = HL_TABLE()[id - 1].sg_gui_bg;
|
color = HL_TABLE()[id - 1].sg_gui_bg;
|
||||||
if (color == INVALCOLOR)
|
if (color == INVALCOLOR)
|
||||||
@ -7695,9 +7729,11 @@ highlight_color(id, what, modec)
|
|||||||
}
|
}
|
||||||
if (fg)
|
if (fg)
|
||||||
return (HL_TABLE()[id - 1].sg_gui_fg_name);
|
return (HL_TABLE()[id - 1].sg_gui_fg_name);
|
||||||
|
if (sp)
|
||||||
|
return (HL_TABLE()[id - 1].sg_gui_sp_name);
|
||||||
return (HL_TABLE()[id - 1].sg_gui_bg_name);
|
return (HL_TABLE()[id - 1].sg_gui_bg_name);
|
||||||
}
|
}
|
||||||
#endif
|
# endif
|
||||||
if (modec == 'c')
|
if (modec == 'c')
|
||||||
{
|
{
|
||||||
if (fg)
|
if (fg)
|
||||||
@ -7805,6 +7841,7 @@ set_hl_attr(idx)
|
|||||||
*/
|
*/
|
||||||
if (sgp->sg_gui_fg == INVALCOLOR
|
if (sgp->sg_gui_fg == INVALCOLOR
|
||||||
&& sgp->sg_gui_bg == INVALCOLOR
|
&& sgp->sg_gui_bg == INVALCOLOR
|
||||||
|
&& sgp->sg_gui_sp == INVALCOLOR
|
||||||
&& sgp->sg_font == NOFONT
|
&& sgp->sg_font == NOFONT
|
||||||
# ifdef FEAT_XFONTSET
|
# ifdef FEAT_XFONTSET
|
||||||
&& sgp->sg_fontset == NOFONTSET
|
&& sgp->sg_fontset == NOFONTSET
|
||||||
@ -7818,6 +7855,7 @@ set_hl_attr(idx)
|
|||||||
at_en.ae_attr = sgp->sg_gui;
|
at_en.ae_attr = sgp->sg_gui;
|
||||||
at_en.ae_u.gui.fg_color = sgp->sg_gui_fg;
|
at_en.ae_u.gui.fg_color = sgp->sg_gui_fg;
|
||||||
at_en.ae_u.gui.bg_color = sgp->sg_gui_bg;
|
at_en.ae_u.gui.bg_color = sgp->sg_gui_bg;
|
||||||
|
at_en.ae_u.gui.sp_color = sgp->sg_gui_sp;
|
||||||
at_en.ae_u.gui.font = sgp->sg_font;
|
at_en.ae_u.gui.font = sgp->sg_font;
|
||||||
# ifdef FEAT_XFONTSET
|
# ifdef FEAT_XFONTSET
|
||||||
at_en.ae_u.gui.fontset = sgp->sg_fontset;
|
at_en.ae_u.gui.fontset = sgp->sg_fontset;
|
||||||
@ -7989,6 +8027,7 @@ syn_add_group(name)
|
|||||||
#ifdef FEAT_GUI
|
#ifdef FEAT_GUI
|
||||||
HL_TABLE()[highlight_ga.ga_len].sg_gui_bg = INVALCOLOR;
|
HL_TABLE()[highlight_ga.ga_len].sg_gui_bg = INVALCOLOR;
|
||||||
HL_TABLE()[highlight_ga.ga_len].sg_gui_fg = INVALCOLOR;
|
HL_TABLE()[highlight_ga.ga_len].sg_gui_fg = INVALCOLOR;
|
||||||
|
HL_TABLE()[highlight_ga.ga_len].sg_gui_sp = INVALCOLOR;
|
||||||
#endif
|
#endif
|
||||||
++highlight_ga.ga_len;
|
++highlight_ga.ga_len;
|
||||||
|
|
||||||
@ -8131,6 +8170,12 @@ gui_do_one_color(idx, do_menu, do_tooltip)
|
|||||||
color_name2handle(HL_TABLE()[idx].sg_gui_bg_name);
|
color_name2handle(HL_TABLE()[idx].sg_gui_bg_name);
|
||||||
didit = TRUE;
|
didit = TRUE;
|
||||||
}
|
}
|
||||||
|
if (HL_TABLE()[idx].sg_gui_sp_name != NULL)
|
||||||
|
{
|
||||||
|
HL_TABLE()[idx].sg_gui_sp =
|
||||||
|
color_name2handle(HL_TABLE()[idx].sg_gui_sp_name);
|
||||||
|
didit = TRUE;
|
||||||
|
}
|
||||||
if (didit) /* need to get a new attr number */
|
if (didit) /* need to get a new attr number */
|
||||||
set_hl_attr(idx);
|
set_hl_attr(idx);
|
||||||
}
|
}
|
||||||
@ -8222,6 +8267,8 @@ highlight_changed()
|
|||||||
break;
|
break;
|
||||||
case 'u': attr |= HL_UNDERLINE;
|
case 'u': attr |= HL_UNDERLINE;
|
||||||
break;
|
break;
|
||||||
|
case 'c': attr |= HL_UNDERCURL;
|
||||||
|
break;
|
||||||
case ':': ++p; /* highlight group name */
|
case ':': ++p; /* highlight group name */
|
||||||
if (attr || *p == NUL) /* no combinations */
|
if (attr || *p == NUL) /* no combinations */
|
||||||
return FAIL;
|
return FAIL;
|
||||||
@ -8320,6 +8367,8 @@ highlight_changed()
|
|||||||
hlt[hlcnt + i].sg_gui_fg = hlt[id - 1].sg_gui_fg;
|
hlt[hlcnt + i].sg_gui_fg = hlt[id - 1].sg_gui_fg;
|
||||||
if (hlt[id - 1].sg_gui_bg != hlt[id_S - 1].sg_gui_bg)
|
if (hlt[id - 1].sg_gui_bg != hlt[id_S - 1].sg_gui_bg)
|
||||||
hlt[hlcnt + i].sg_gui_bg = hlt[id - 1].sg_gui_bg;
|
hlt[hlcnt + i].sg_gui_bg = hlt[id - 1].sg_gui_bg;
|
||||||
|
if (hlt[id - 1].sg_gui_sp != hlt[id_S - 1].sg_gui_sp)
|
||||||
|
hlt[hlcnt + i].sg_gui_sp = hlt[id - 1].sg_gui_sp;
|
||||||
if (hlt[id - 1].sg_font != hlt[id_S - 1].sg_font)
|
if (hlt[id - 1].sg_font != hlt[id_S - 1].sg_font)
|
||||||
hlt[hlcnt + i].sg_font = hlt[id - 1].sg_font;
|
hlt[hlcnt + i].sg_font = hlt[id - 1].sg_font;
|
||||||
# ifdef FEAT_XFONTSET
|
# ifdef FEAT_XFONTSET
|
||||||
|
@ -182,6 +182,8 @@ struct builtin_term builtin_termcaps[] =
|
|||||||
{(int)KS_SO, IF_EB("\033|16h", ESC_STR "|16h")}, /* HL_STANDOUT */
|
{(int)KS_SO, IF_EB("\033|16h", ESC_STR "|16h")}, /* HL_STANDOUT */
|
||||||
{(int)KS_UE, IF_EB("\033|8H", ESC_STR "|8H")}, /* HL_UNDERLINE */
|
{(int)KS_UE, IF_EB("\033|8H", ESC_STR "|8H")}, /* HL_UNDERLINE */
|
||||||
{(int)KS_US, IF_EB("\033|8h", ESC_STR "|8h")}, /* HL_UNDERLINE */
|
{(int)KS_US, IF_EB("\033|8h", ESC_STR "|8h")}, /* HL_UNDERLINE */
|
||||||
|
{(int)KS_UCE, IF_EB("\033|8C", ESC_STR "|8C")}, /* HL_UNDERCURL */
|
||||||
|
{(int)KS_UCS, IF_EB("\033|8c", ESC_STR "|8c")}, /* HL_UNDERCURL */
|
||||||
{(int)KS_CZR, IF_EB("\033|4H", ESC_STR "|4H")}, /* HL_ITALIC */
|
{(int)KS_CZR, IF_EB("\033|4H", ESC_STR "|4H")}, /* HL_ITALIC */
|
||||||
{(int)KS_CZH, IF_EB("\033|4h", ESC_STR "|4h")}, /* HL_ITALIC */
|
{(int)KS_CZH, IF_EB("\033|4h", ESC_STR "|4h")}, /* HL_ITALIC */
|
||||||
{(int)KS_VB, IF_EB("\033|f", ESC_STR "|f")},
|
{(int)KS_VB, IF_EB("\033|f", ESC_STR "|f")},
|
||||||
@ -195,7 +197,7 @@ struct builtin_term builtin_termcaps[] =
|
|||||||
{(int)KS_CM, IF_EB("\033|%d;%dM", ESC_STR "|%d;%dM")},
|
{(int)KS_CM, IF_EB("\033|%d;%dM", ESC_STR "|%d;%dM")},
|
||||||
# endif
|
# endif
|
||||||
/* there are no key sequences here, the GUI sequences are recognized
|
/* there are no key sequences here, the GUI sequences are recognized
|
||||||
* in check_termcodes() */
|
* in check_termcode() */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef NO_BUILTIN_TCAPS
|
#ifndef NO_BUILTIN_TCAPS
|
||||||
@ -1248,6 +1250,8 @@ struct builtin_term builtin_termcaps[] =
|
|||||||
{(int)KS_SO, "[SO]"},
|
{(int)KS_SO, "[SO]"},
|
||||||
{(int)KS_UE, "[UE]"},
|
{(int)KS_UE, "[UE]"},
|
||||||
{(int)KS_US, "[US]"},
|
{(int)KS_US, "[US]"},
|
||||||
|
{(int)KS_UCE, "[UCE]"},
|
||||||
|
{(int)KS_UCS, "[UCS]"},
|
||||||
{(int)KS_MS, "[MS]"},
|
{(int)KS_MS, "[MS]"},
|
||||||
{(int)KS_UT, "[UT]"},
|
{(int)KS_UT, "[UT]"},
|
||||||
# ifdef TERMINFO
|
# ifdef TERMINFO
|
||||||
@ -1644,7 +1648,8 @@ set_termname(term)
|
|||||||
{KS_VS, "vs"}, {KS_ME, "me"}, {KS_MR, "mr"},
|
{KS_VS, "vs"}, {KS_ME, "me"}, {KS_MR, "mr"},
|
||||||
{KS_MD, "md"}, {KS_SE, "se"}, {KS_SO, "so"},
|
{KS_MD, "md"}, {KS_SE, "se"}, {KS_SO, "so"},
|
||||||
{KS_CZH,"ZH"}, {KS_CZR,"ZR"}, {KS_UE, "ue"},
|
{KS_CZH,"ZH"}, {KS_CZR,"ZR"}, {KS_UE, "ue"},
|
||||||
{KS_US, "us"}, {KS_CM, "cm"}, {KS_SR, "sr"},
|
{KS_US, "us"}, {KS_UCE, "Ce"}, {KS_UCS, "Cs"},
|
||||||
|
{KS_CM, "cm"}, {KS_SR, "sr"},
|
||||||
{KS_CRI,"RI"}, {KS_VB, "vb"}, {KS_KS, "ks"},
|
{KS_CRI,"RI"}, {KS_VB, "vb"}, {KS_KS, "ks"},
|
||||||
{KS_KE, "ke"}, {KS_TI, "ti"}, {KS_TE, "te"},
|
{KS_KE, "ke"}, {KS_TI, "ti"}, {KS_TE, "te"},
|
||||||
{KS_BC, "bc"}, {KS_CSB,"Sb"}, {KS_CSF,"Sf"},
|
{KS_BC, "bc"}, {KS_CSB,"Sb"}, {KS_CSF,"Sf"},
|
||||||
|
@ -36,5 +36,5 @@
|
|||||||
#define VIM_VERSION_NODOT "vim70aa"
|
#define VIM_VERSION_NODOT "vim70aa"
|
||||||
#define VIM_VERSION_SHORT "7.0aa"
|
#define VIM_VERSION_SHORT "7.0aa"
|
||||||
#define VIM_VERSION_MEDIUM "7.0aa ALPHA"
|
#define VIM_VERSION_MEDIUM "7.0aa ALPHA"
|
||||||
#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Mar 11)"
|
#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2005 Mar 15)"
|
||||||
#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Mar 11, compiled "
|
#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2005 Mar 15, compiled "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user