mirror of
https://github.com/vim/vim
synced 2025-07-16 01:01:58 +00:00
updated for version 7.0c13
This commit is contained in:
@ -28,13 +28,14 @@ endif
|
||||
:hi Visual gui=none guifg=khaki guibg=olivedrab cterm=reverse
|
||||
:hi WarningMsg guifg=salmon ctermfg=1
|
||||
:hi String guifg=SkyBlue ctermfg=darkcyan
|
||||
:hi Comment guifg=DimGrey ctermfg=darkgrey
|
||||
:hi Comment term=bold ctermfg=11 guifg=#80a0ff
|
||||
:hi Constant guifg=#ffa0a0 ctermfg=brown
|
||||
:hi Special guifg=DarkKhaki ctermfg=brown
|
||||
:hi Identifier guifg=salmon ctermfg=darkred
|
||||
:hi Include guifg=darkred ctermfg=darkred
|
||||
:hi PreProc guifg=olivedrab ctermfg=red
|
||||
:hi Operator guifg=CornflowerBlue ctermfg=darkcyan
|
||||
:hi Special guifg=green ctermfg=brown
|
||||
:hi Identifier guifg=salmon ctermfg=red
|
||||
:hi Include guifg=red ctermfg=red
|
||||
:hi PreProc guifg=red guibg=white ctermfg=red
|
||||
:hi Operator guifg=Red ctermfg=Red
|
||||
":hi Operator guifg=CornflowerBlue ctermfg=darkcyan
|
||||
:hi Define guifg=gold gui=bold ctermfg=yellow
|
||||
:hi Type guifg=darkkhaki ctermfg=2
|
||||
:hi Function guifg=navajowhite ctermfg=brown
|
||||
|
@ -1,4 +1,4 @@
|
||||
*change.txt* For Vim version 7.0c. Last change: 2006 Mar 16
|
||||
*change.txt* For Vim version 7.0c. Last change: 2006 Apr 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -1542,6 +1542,9 @@ found here: |sort()|.
|
||||
< To sort on the text at virtual column 10 (thus
|
||||
ignoring the difference between tabs and spaces): >
|
||||
:sort /.*\%10v/
|
||||
< To sort on the first number in the line, no matter
|
||||
what is in front of it: >
|
||||
:sort /.*\ze\d/
|
||||
<
|
||||
Note that using ":sort" with ":global" doesn't sort the matching lines, it's
|
||||
quite useless.
|
||||
|
@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 7.0c. Last change: 2006 Apr 06
|
||||
*eval.txt* For Vim version 7.0c. Last change: 2006 Apr 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -1549,29 +1549,33 @@ eval( {string}) any evaluate {string} into its value
|
||||
eventhandler( ) Number TRUE if inside an event handler
|
||||
executable( {expr}) Number 1 if executable {expr} exists
|
||||
exists( {expr}) Number TRUE if {expr} exists
|
||||
extend({expr1}, {expr2} [, {expr3}])
|
||||
List/Dict insert items of {expr2} into {expr1}
|
||||
expand( {expr}) String expand special keywords in {expr}
|
||||
filereadable( {file}) Number TRUE if {file} is a readable file
|
||||
filewritable( {file}) Number TRUE if {file} is a writable file
|
||||
filter( {expr}, {string}) List/Dict remove items from {expr} where
|
||||
{string} is 0
|
||||
finddir( {name}[, {path}[, {count}]])
|
||||
String Find directory {name} in {path}
|
||||
String find directory {name} in {path}
|
||||
findfile( {name}[, {path}[, {count}]])
|
||||
String Find file {name} in {path}
|
||||
filewritable( {file}) Number TRUE if {file} is a writable file
|
||||
String find file {name} in {path}
|
||||
fnamemodify( {fname}, {mods}) String modify file name
|
||||
foldclosed( {lnum}) Number first line of fold at {lnum} if closed
|
||||
foldclosedend( {lnum}) Number last line of fold at {lnum} if closed
|
||||
foldlevel( {lnum}) Number fold level at {lnum}
|
||||
foldtext( ) String line displayed for closed fold
|
||||
foldtextresult( {lnum}) String text for closed fold at {lnum}
|
||||
foreground( ) Number bring the Vim window to the foreground
|
||||
function( {name}) Funcref reference to function {name}
|
||||
garbagecollect() none free memory, breaking cyclic references
|
||||
get( {list}, {idx} [, {def}]) any get item {idx} from {list} or {def}
|
||||
get( {dict}, {key} [, {def}]) any get item {key} from {dict} or {def}
|
||||
getbufline( {expr}, {lnum} [, {end}])
|
||||
List lines {lnum} to {end} of buffer {expr}
|
||||
getbufvar( {expr}, {varname}) any variable {varname} in buffer {expr}
|
||||
getchar( [expr]) Number get one character from the user
|
||||
getcharmod( ) Number modifiers for the last typed character
|
||||
getbufvar( {expr}, {varname}) variable {varname} in buffer {expr}
|
||||
getcmdline() String return the current command-line
|
||||
getcmdpos() Number return cursor position in command-line
|
||||
getcmdtype() String return the current command-line type
|
||||
@ -1590,7 +1594,7 @@ getreg( [{regname} [, 1]]) String contents of register
|
||||
getregtype( [{regname}]) String type of register
|
||||
getwinposx() Number X coord in pixels of GUI Vim window
|
||||
getwinposy() Number Y coord in pixels of GUI Vim window
|
||||
getwinvar( {nr}, {varname}) variable {varname} in window {nr}
|
||||
getwinvar( {nr}, {varname}) any variable {varname} in window {nr}
|
||||
glob( {expr}) String expand file wildcards in {expr}
|
||||
globpath( {path}, {expr}) String do glob({expr}) for all dirs in {path}
|
||||
has( {feature}) Number TRUE if feature {feature} supported
|
||||
@ -1611,6 +1615,7 @@ index( {list}, {expr} [, {start} [, {ic}]])
|
||||
input( {prompt} [, {text} [, {completion}]])
|
||||
String get input from the user
|
||||
inputdialog( {p} [, {t} [, {c}]]) String like input() but in a GUI dialog
|
||||
inputlist( {textlist}) Number let the user pick from a choice list
|
||||
inputrestore() Number restore typeahead
|
||||
inputsave() Number save and clear typeahead
|
||||
inputsecret( {prompt} [, {text}]) String like input() but hiding the text
|
||||
@ -1689,6 +1694,7 @@ setcmdpos( {pos}) Number set cursor position in command-line
|
||||
setline( {lnum}, {line}) Number set line {lnum} to {line}
|
||||
setloclist( {nr}, {list}[, {action}])
|
||||
Number modify location list using {list}
|
||||
setpos( {expr}, {list}) none set the {expr} position to {list}
|
||||
setqflist( {list}[, {action}]) Number modify quickfix list using {list}
|
||||
setreg( {n}, {v}[, {opt}]) Number set register to value and type
|
||||
setwinvar( {nr}, {varname}, {val}) set {varname} in window {nr} to {val}
|
||||
@ -2730,7 +2736,7 @@ getfontname([{name}]) *getfontname()*
|
||||
font name. If not then an empty string is returned.
|
||||
Otherwise the actual font name is returned, or {name} if the
|
||||
GUI does not support obtaining the real name.
|
||||
Only works when the GUI is running, thus not you your vimrc or
|
||||
Only works when the GUI is running, thus not in your vimrc or
|
||||
gvimrc file. Use the |GUIEnter| autocommand to use this
|
||||
function just after the GUI has started.
|
||||
Note that the GTK 2 GUI accepts any font name, thus checking
|
||||
|
@ -171,6 +171,7 @@ Versions ~
|
||||
|version4.txt| Differences between Vim version 3.0 and 4.x
|
||||
|version5.txt| Differences between Vim version 4.6 and 5.x
|
||||
|version6.txt| Differences between Vim version 5.7 and 6.x
|
||||
|version7.txt| Differences between Vim version 6.4 and 7.x
|
||||
*sys-file-list*
|
||||
Remarks about specific systems ~
|
||||
|os_390.txt| OS/390 Unix
|
||||
@ -195,12 +196,6 @@ Standard plugins ~
|
||||
|pi_zip.txt| Zip archive explorer
|
||||
|
||||
LOCAL ADDITIONS: *local-additions*
|
||||
|cecutil.txt| DrChip's Utilities Jun 11, 2004
|
||||
|example.txt| Example for a locally added help file
|
||||
|matchit.txt| Extended "%" matching
|
||||
|test.txt| Testing the h<>lp c<>mm<6D>nd n<>w
|
||||
|typecorr.txt| Plugin for correcting typing mistakes
|
||||
|helpp.txt| Dummy line to avoid an error message
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*bars* Bars example
|
||||
|
@ -1,4 +1,4 @@
|
||||
*intro.txt* For Vim version 7.0c. Last change: 2005 Sep 01
|
||||
*intro.txt* For Vim version 7.0c. Last change: 2006 Apr 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -94,13 +94,15 @@ mention that.
|
||||
There are several mailing lists for Vim:
|
||||
<vim@vim.org>
|
||||
For discussions about using existing versions of Vim: Useful mappings,
|
||||
questions, answers, where to get a specific version, etc.
|
||||
questions, answers, where to get a specific version, etc. There are
|
||||
quite a few people watching this list and answering questions, also
|
||||
for beginners. Don't hesitate to ask your question here.
|
||||
<vim-dev@vim.org> *vim-dev* *vimdev*
|
||||
For discussions about changing Vim: New features, porting, patches,
|
||||
beta-test versions, etc.
|
||||
<vim-announce@vim.org> *vim-announce*
|
||||
Announcements about new versions of Vim; also for beta-test versions
|
||||
and ports to different systems.
|
||||
and ports to different systems. This is a read-only list.
|
||||
<vim-multibyte@vim.org> *vim-multibyte*
|
||||
For discussions about using and improving the multi-byte aspects of
|
||||
Vim.
|
||||
|
@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 7.0c. Last change: 2006 Apr 05
|
||||
*options.txt* For Vim version 7.0c. Last change: 2006 Apr 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -1442,6 +1442,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
{not in Vi}
|
||||
Number of screen lines to use for the command-line. Helps avoiding
|
||||
|hit-enter| prompts.
|
||||
The value of this option is stored with the tab page, so that each tab
|
||||
page can have a different value.
|
||||
|
||||
*'cmdwinheight'* *'cwh'*
|
||||
'cmdwinheight' 'cwh' number (default 7)
|
||||
@ -6522,8 +6524,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
'tagrelative' 'tr' boolean (Vim default: on, Vi default: off)
|
||||
global
|
||||
{not in Vi}
|
||||
If on and using a tag file in another directory, file names in that
|
||||
tag file are relative to the directory where the tag file is.
|
||||
If on and using a tags file in another directory, file names in that
|
||||
tags file are relative to the directory where the tags file is.
|
||||
NOTE: This option is set to the Vi default value when 'compatible' is
|
||||
set and to the Vim default value when 'compatible' is reset.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
*tabpage.txt* For Vim version 7.0c. Last change: 2006 Apr 06
|
||||
*tabpage.txt* For Vim version 7.0c. Last change: 2006 Apr 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -205,6 +205,8 @@ files.
|
||||
|
||||
Variables local to a tab page start with "t:". |tabpage-variable|
|
||||
|
||||
Currently there is only one option local to a tab page: 'cmdheight'.
|
||||
|
||||
The TabLeave and TabEnter autocommand events can be used to do something when
|
||||
switching from one tab page to another. The exact order depends on what you
|
||||
are doing. When creating a new tab page this works as if you create a new
|
||||
|
@ -5611,6 +5611,7 @@ hebrew hebrew.txt /*hebrew*
|
||||
hebrew.txt hebrew.txt /*hebrew.txt*
|
||||
help various.txt /*help*
|
||||
help-context help.txt /*help-context*
|
||||
help-tags tags 1
|
||||
help-translated various.txt /*help-translated*
|
||||
help-xterm-window various.txt /*help-xterm-window*
|
||||
help.txt help.txt /*help.txt*
|
||||
|
@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 7.0c. Last change: 2006 Apr 07
|
||||
*todo.txt* For Vim version 7.0c. Last change: 2006 Apr 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -33,7 +33,7 @@ be worked on, but only if you sponsor Vim development. See |sponsor|.
|
||||
Handle postponed prefix with COMPOUNDPERMITFLAG or COMPOUNDFORBIDFLAG.
|
||||
WFP_COMPPERMIT and WFP_COMPFORBID
|
||||
|
||||
":mkspell" still takes too long in Hungarian dictionary.
|
||||
":mkspell" still takes much too long in Hungarian dictionary.
|
||||
|
||||
Use ~/tmp/hungarian*.txt to test dictionary with.
|
||||
|
||||
@ -1805,6 +1805,11 @@ Shared libraries:
|
||||
|
||||
|
||||
Tags:
|
||||
9 With ":set tags=./tags,../tags" and a tag appears in both tags files it is
|
||||
added twice. Requires figuring out the actual file name for each found
|
||||
match. Remove tag_fname from the match and combine it with the fname in
|
||||
the match (without expanding or other things that take time). When
|
||||
'tagrelative' is off tag_fname isn't needed at all.
|
||||
7 Can CTRL-] (jump to tag) include a following "." and "->" to restrict the
|
||||
number of possible matches? Check tags file for an item that has members.
|
||||
(Flemming Madsen)
|
||||
|
@ -1,4 +1,4 @@
|
||||
*usr_41.txt* For Vim version 7.0c. Last change: 2006 Mar 24
|
||||
*usr_41.txt* For Vim version 7.0c. Last change: 2006 Apr 09
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@ -577,15 +577,19 @@ used for. You can find an alphabetical list here: |functions|. Use CTRL-] on
|
||||
the function name to jump to detailed help on it.
|
||||
|
||||
String manipulation:
|
||||
char2nr() get ASCII value of a character
|
||||
nr2char() get a character by its ASCII value
|
||||
char2nr() get ASCII value of a character
|
||||
str2nr() convert a string to a number
|
||||
printf() format a string according to % items
|
||||
escape() escape characters in a string with a '\'
|
||||
tr() translate characters from one set to another
|
||||
strtrans() translate a string to make it printable
|
||||
tolower() turn a string to lowercase
|
||||
toupper() turn a string to uppercase
|
||||
match() position where a pattern matches in a string
|
||||
matchend() position where a pattern match ends in a string
|
||||
matchstr() match of a pattern in a string
|
||||
matchlist() like matchstr() and also return submatches
|
||||
stridx() first index of a short string in a long string
|
||||
strridx() last index of a short string in a long string
|
||||
strlen() length of a string
|
||||
@ -594,6 +598,9 @@ String manipulation:
|
||||
strpart() get part of a string
|
||||
expand() expand special keywords
|
||||
iconv() convert text from one encoding to another
|
||||
byteidx() byte index of a character in a string
|
||||
repeat() repeat a string multiple times
|
||||
eval() evaluate a string expression
|
||||
|
||||
List manipulation:
|
||||
get() get an item without error for wrong index
|
||||
@ -611,12 +618,14 @@ List manipulation:
|
||||
reverse() reverse the order of a List
|
||||
split() split a String into a List
|
||||
join() join List items into a String
|
||||
range() return a List with a sequence of numbers
|
||||
string() String representation of a List
|
||||
call() call a function with List as arguments
|
||||
index() index of a value in a List
|
||||
max() maximum value in a List
|
||||
min() minimum value in a List
|
||||
count() count number of times a value appears in a List
|
||||
repeat() repeat a List multiple times
|
||||
|
||||
Dictionary manipulation:
|
||||
get() get an entry without an error for a wrong key
|
||||
@ -637,15 +646,30 @@ Dictionary manipulation:
|
||||
min() minimum value in a Dictionary
|
||||
count() count number of times a value appears
|
||||
|
||||
Working with text in the current buffer:
|
||||
byte2line() get line number at a specific byte count
|
||||
line2byte() byte count at a specific line
|
||||
Variables:
|
||||
type() type of a variable
|
||||
islocked() check if a variable is locked
|
||||
function() get a Funcref for a function name
|
||||
getbufvar() get a variable value from a specific buffer
|
||||
setbufvar() set a variable in a specific buffer
|
||||
getwinvar() get a variable value from a specific window
|
||||
setwinvar() set a variable in a specific window
|
||||
garbagecollect() possibly free memory
|
||||
|
||||
Cursor and mark position:
|
||||
col() column number of the cursor or a mark
|
||||
virtcol() screen column of the cursor or a mark
|
||||
line() line number of the cursor or mark
|
||||
wincol() window column number of the cursor
|
||||
winline() window line number of the cursor
|
||||
cursor() position the cursor at a line/column
|
||||
getpos() get position of cursor, mark, etc.
|
||||
setpos() set position of cursor, mark, etc.
|
||||
byte2line() get line number at a specific byte count
|
||||
line2byte() byte count at a specific line
|
||||
diff_filler() get the number of filler lines above a line
|
||||
|
||||
Working with text in the current buffer:
|
||||
getline() get a line or list of lines from the buffer
|
||||
setline() replace a line in the buffer
|
||||
append() append line or list of lines in the buffer
|
||||
@ -658,24 +682,27 @@ Working with text in the current buffer:
|
||||
searchpos() find a match for a pattern
|
||||
searchpair() find the other end of a start/skip/end
|
||||
searchpairpos() find the other end of a start/skip/end
|
||||
searchdecl() search for the declaration of a name
|
||||
|
||||
System functions and manipulation of files:
|
||||
browse() put up a file requester
|
||||
glob() expand wildcards
|
||||
globpath() expand wildcards in a number of directories
|
||||
findfile() find a file in a list of directories
|
||||
finddir() find a directory in a list of directories
|
||||
resolve() find out where a shortcut points to
|
||||
fnamemodify() modify a file name
|
||||
pathshorten() shorten directory names in a path
|
||||
simplify() simplify a path without changing its meaning
|
||||
executable() check if an executable program exists
|
||||
filereadable() check if a file can be read
|
||||
filewritable() check if a file can be written to
|
||||
mkdir() create a new directory
|
||||
getfperm() get the permissions of a file
|
||||
getftype() get the kind of a file
|
||||
isdirectory() check if a directory exists
|
||||
getcwd() get the current working directory
|
||||
getfsize() get the size of a file
|
||||
getftime() get last modification time of a file
|
||||
localtime() get current time
|
||||
strftime() convert time to a string
|
||||
getcwd() get the current working directory
|
||||
tempname() get the name of a temporary file
|
||||
mkdir() create a new directory
|
||||
delete() delete a file
|
||||
rename() rename a file
|
||||
system() get the result of a shell command
|
||||
@ -683,6 +710,13 @@ System functions and manipulation of files:
|
||||
readfile() read a file into a List of lines
|
||||
writefile() write a List of lines into a file
|
||||
|
||||
Date and Time:
|
||||
getftime() get last modification time of a file
|
||||
localtime() get current time in seconds
|
||||
strftime() convert time to a string
|
||||
reltime() get the current or elapsed time accurately
|
||||
reltimestr() convert reltime() result to a string
|
||||
|
||||
Buffers, windows and the argument list:
|
||||
argc() number of entries in the argument list
|
||||
argidx() current position in the argument list
|
||||
@ -692,27 +726,52 @@ Buffers, windows and the argument list:
|
||||
bufloaded() check if a buffer exists and is loaded
|
||||
bufname() get the name of a specific buffer
|
||||
bufnr() get the buffer number of a specific buffer
|
||||
tabpagebuflist() return List of buffers in a tab page
|
||||
tabpagenr() get the number of a tab page
|
||||
tabpagewinnr() like winnr() for a specified tab page
|
||||
winnr() get the window number for the current window
|
||||
bufwinnr() get the window number of a specific buffer
|
||||
winbufnr() get the buffer number of a specific window
|
||||
getbufline() get a list of lines from the specified buffer
|
||||
getbufvar() get a variable value from a specific buffer
|
||||
setbufvar() set a variable in a specific buffer
|
||||
getwinvar() get a variable value from a specific window
|
||||
setwinvar() set a variable in a specific window
|
||||
|
||||
Command line:
|
||||
getcmdline() get the current command line
|
||||
getcmdpos() get position of the cursor in the command line
|
||||
setcmdpos() set position of the cursor in the command line
|
||||
getcmdtype() return the current command-line type
|
||||
|
||||
Quickfix and location lists:
|
||||
getqflist() list of quickfix errors
|
||||
setqflist() modify a quickfix list
|
||||
getloclist() list of location list items
|
||||
setloclist() modify a location list
|
||||
|
||||
Insert mode completion:
|
||||
complete() set found matches
|
||||
complete_add() add to found matches
|
||||
complete_check() check if completion should be aborted
|
||||
pumvisible() check if the popup menu is displayed
|
||||
|
||||
Folding:
|
||||
foldclosed() check for a closed fold at a specific line
|
||||
foldclosedend() like foldclosed() but return the last line
|
||||
foldlevel() check for the fold level at a specific line
|
||||
foldtext() generate the line displayed for a closed fold
|
||||
foldtextresult() get the text displayed for a closed fold
|
||||
|
||||
Syntax highlighting:
|
||||
Syntax and highlighting:
|
||||
hlexists() check if a highlight group exists
|
||||
hlID() get ID of a highlight group
|
||||
synID() get syntax ID at a specific position
|
||||
synIDattr() get a specific attribute of a syntax ID
|
||||
synIDtrans() get translated syntax ID
|
||||
diff_hlID() get highlight ID for diff mode at a position
|
||||
matcharg() get info about |:match| arguments
|
||||
|
||||
Spelling:
|
||||
spellbadword() locate badly spelled word at or after cursor
|
||||
spellsuggest() return suggested spelling corrections
|
||||
soundfold() return the sound-a-like equivalent of a word
|
||||
|
||||
History:
|
||||
histadd() add an item to a history
|
||||
@ -721,15 +780,23 @@ History:
|
||||
histnr() get highest index of a history list
|
||||
|
||||
Interactive:
|
||||
browse() put up a file requester
|
||||
browsedir() put up a directory requester
|
||||
confirm() let the user make a choice
|
||||
getchar() get a character from the user
|
||||
getcharmod() get modifiers for the last typed character
|
||||
input() get a line from the user
|
||||
inputlist() let the user pick an entry from a list
|
||||
inputsecret() get a line from the user without showing it
|
||||
inputdialog() get a line from the user in a dialog
|
||||
inputsave() save and clear typeahead
|
||||
inputrestore() restore typeahead
|
||||
|
||||
GUI:
|
||||
getfontname() get name of current font being used
|
||||
getwinposx() X position of the GUI Vim window
|
||||
getwinposy() Y position of the GUI Vim window
|
||||
|
||||
Vim server:
|
||||
serverlist() return the list of server names
|
||||
remote_send() send command characters to a Vim server
|
||||
@ -740,8 +807,14 @@ Vim server:
|
||||
foreground() move the Vim window to the foreground
|
||||
remote_foreground() move the Vim server window to the foreground
|
||||
|
||||
Window size and position:
|
||||
winheight() get height of a specific window
|
||||
winwidth() get width of a specific window
|
||||
winrestcmd() return command to restore window sizes
|
||||
winsaveview() get view of current window
|
||||
winrestview() restore saved view of current window
|
||||
|
||||
Various:
|
||||
type() type of a variable
|
||||
mode() get current editing mode
|
||||
visualmode() last visual mode used
|
||||
hasmapto() check if a mapping exists
|
||||
@ -749,23 +822,20 @@ Various:
|
||||
maparg() get rhs of a mapping
|
||||
exists() check if a variable, function, etc. exists
|
||||
has() check if a feature is supported in Vim
|
||||
getqflist() list of quickfix errors
|
||||
getloclist() list of location list items
|
||||
changenr() return number of most recent change
|
||||
cscope_connection() check if a cscope connection exists
|
||||
did_filetype() check if a FileType autocommand was used
|
||||
eventhandler() check if invoked by an event handler
|
||||
getwinposx() X position of the GUI Vim window
|
||||
getwinposy() Y position of the GUI Vim window
|
||||
winheight() get height of a specific window
|
||||
winwidth() get width of a specific window
|
||||
|
||||
libcall() call a function in an external library
|
||||
libcallnr() idem, returning a number
|
||||
|
||||
getreg() get contents of a register
|
||||
getregtype() get type of a register
|
||||
setqflist() modify a quickfix list
|
||||
setloclist() modify a location list
|
||||
setreg() set contents and type of a register
|
||||
|
||||
taglist() get list of matching tags
|
||||
tagfiles() get a list of tags files
|
||||
|
||||
==============================================================================
|
||||
*41.7* Defining a function
|
||||
|
@ -1,4 +1,4 @@
|
||||
*version7.txt* For Vim version 7.0c. Last change: 2006 Apr 07
|
||||
*version7.txt* For Vim version 7.0c. Last change: 2006 Apr 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -2411,4 +2411,7 @@ needed on the spell file.
|
||||
|
||||
glob('/dir/\$ABC/*') didn't work.
|
||||
|
||||
When using several tab pages and changing 'cmdheight' the display could become
|
||||
messed up. Now store the value of 'cmdheight' separately for each tab page.
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
@ -9,9 +9,8 @@ elseif exists("b:current_syntax")
|
||||
finish
|
||||
else
|
||||
endif
|
||||
"% 12 Errors?
|
||||
"% 11 Errors?
|
||||
syn match sisu_error contains=sisu_contain,sisu_control,sisu_markpara,sisu_mark,sisu_content_alt,sisu_error_wspace "<![^ei]\S\+!>"
|
||||
"% 11 Expression Substitution: and Backslash Notation
|
||||
"% 10 Markers: Endnote Identifiers, Pagebreaks etc.:
|
||||
if !exists("sisu_no_identifiers")
|
||||
syn match sisu_mark_endnote "\~^"
|
||||
@ -19,20 +18,16 @@ if !exists("sisu_no_identifiers")
|
||||
syn match sisu_break "<br>\|<br />"
|
||||
syn match sisu_control "<p>\|</p>\|<p />\|<:p[bn]>"
|
||||
syn match sisu_html "<center>\|</center>"
|
||||
syn match sisu_markpara "^_\([12]\*\?\|\*\)\s\+"
|
||||
syn match sisu_markpara "#[ 1]\|_# "
|
||||
syn match sisu_marktail "[~-]#"
|
||||
syn match sisu_html "<td>\|<td \|<tr>\|</td>\|</tr>\|<table>\|<table \|</table>"
|
||||
syn match sisu_control "\""
|
||||
syn match sisu_underline "\(^\| \)_[a-zA-Z0-9]\+_\([ .,]\|$\)"he=e-1
|
||||
syn match sisu_underline "\(^\| \)_[a-zA-Z0-9]\+_\([ .,]\|$\)"
|
||||
syn match sisu_number "[0-9a-f]\{32\}\|[0-9a-f]\{64\}"
|
||||
"metaverse specific
|
||||
syn match sisu_ocn "<\~\d\+;\w\d\+;\w\d\+>"
|
||||
syn match sisu_digest "<[0-9a-f]\{32\}:[0-9a-f]\{32\}>\|<[0-9a-f]\{32\}>"
|
||||
syn match sisu_digest "<[0-9a-f]\{64\}:[0-9a-f]\{64\}>\|<[0-9a-f]\{64\}>"
|
||||
syn match sisu_marktail "<\~#>"
|
||||
syn match sisu_markpara "<:i[12]>"
|
||||
syn match sisu_link " \*\~\S\+"
|
||||
syn match sisu_action "^<<.\+"
|
||||
syn match sisu_action "^<:insert\d\+>"
|
||||
syn match sisu_contain "<:e>"
|
||||
endif
|
||||
@ -46,24 +41,25 @@ syn match sisu_error "<a href\|</a>]" contains=sisu_error
|
||||
"% 7 Simple Enclosed Markup:
|
||||
" Simple Markup:
|
||||
"% header
|
||||
syn region sisu_header contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break matchgroup=sisu_header start="0\~" end="$"
|
||||
syn region sisu_header_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break matchgroup=sisu_header start="^0\~\(\S\+\|[^-]\)" end="$"
|
||||
"% headings
|
||||
syn region sisu_heading contains=sisu_mark_endnote,sisu_content_endnote,sisu_marktail,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_ocn,sisu_digest,sisu_error,sisu_error_wspace,sisu_error_spell matchgroup=sisu_heading start="[1-8]\~[^-]" end="$"
|
||||
syn region sisu_heading contains=sisu_mark_endnote,sisu_content_endnote,sisu_marktail,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_ocn,sisu_error,sisu_error_wspace,sisu_error_spell matchgroup=sisu_structure start="^[1-8]\~\(\S\+\|[^-]\)" end="$"
|
||||
"% grouped text
|
||||
syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell matchgroup=sisu_contain start="table{.\+" end="}table"
|
||||
syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell matchgroup=sisu_contain start="{t\~h}" end="$$"
|
||||
syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell matchgroup=sisu_contain start="^\(alt\|group\|poem\){" end="^}\(alt\|group\|poem\)"
|
||||
syn region sisu_content_alt contains=sisu_error matchgroup=sisu_contain start="^code{" end="^}code"
|
||||
"% endnotes
|
||||
syn region sisu_content_endnote contains=sisu_digest,sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_error_spell,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\~{" end="}\~" skip="\n"
|
||||
syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_error_spell,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\~{" end="}\~" skip="\n"
|
||||
syn region sisu_content_endnote contains=sisu_strikeout,sisu_number,sisu_control,sisu_link,sisu_identifier,sisu_error,sisu_error_wspace,sisu_error_spell,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\^\~" end="\n\n"
|
||||
"% images
|
||||
syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_control,sisu_error,sisu_error_spell matchgroup=sisu_link start="{" end="}\(\(http://\|\.\./\)\S\+\|image\)" oneline
|
||||
"syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell matchgroup=sisu_link start="{" end="}\(\(http://\|\.\./\)\S\+\|image\)" oneline
|
||||
"sisu_identifier fix
|
||||
""syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell matchgroup=sisu_link start="{" end="}\(http\S\+\|image\)" oneline
|
||||
syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell matchgroup=sisu_link start="{" end="}\(\(http://\|\.\./\)\S\+\|image\)" oneline
|
||||
"% line operations
|
||||
syn region sisu_link contains=sisu_error,sisu_error_wspace,sisu_error_spell matchgroup=sisu_action start="^<<\s*|[a-zA-Z0-9^._-]\+|@|[a-zA-Z0-9^._-]\+|"rs=s+2 end="$"
|
||||
syn region sisu_control contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_error,sisu_error_wspace,sisu_error_spell matchgroup=sisu_control start="\(\(^\| \)!_ \|<:b>\)" end="$"
|
||||
syn region sisu_normal contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_error,sisu_error_wspace,sisu_error_spell matchgroup=sisu_markpara start="^_\([12]\*\?\|\*\) " end="$"
|
||||
syn region sisu_normal contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_error,sisu_error_wspace,sisu_error_spell matchgroup=sisu_markpara start="^\(#[ 1]\|_# \)" end="$"
|
||||
"% font face curly brackets
|
||||
syn region sisu_control contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_error,sisu_error_spell matchgroup=sisu_control start="\(\(^\| \)!_ \|<:b>\)" end="$"
|
||||
syn region sisu_control contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell matchgroup=sisu_fontface start="\*{" end="}\*"
|
||||
syn region sisu_control contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell matchgroup=sisu_fontface start="!{" end="}!"
|
||||
syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell matchgroup=sisu_fontface start="_{" end="}_"
|
||||
@ -72,23 +68,19 @@ syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_control,sisu_
|
||||
syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell matchgroup=sisu_fontface start="\^{" end="}\^"
|
||||
syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell matchgroup=sisu_fontface start=",{" end="},"
|
||||
syn region sisu_strikeout contains=sisu_error matchgroup=sisu_fontface start="-{" end="}-"
|
||||
syn region sisu_control contains=sisu_error matchgroup=sisu_content_alt start="<b>" end="</b>" oneline
|
||||
syn region sisu_control contains=sisu_error matchgroup=sisu_content_alt start="<em>" end="</em>" oneline
|
||||
syn region sisu_identifier contains=sisu_error matchgroup=sisu_content_alt start="<u>" end="</u>" oneline
|
||||
syn region sisu_identifier contains=sisu_error matchgroup=sisu_content_alt start="<i>" end="</i>" oneline
|
||||
syn region sisu_identifier contains=sisu_error matchgroup=sisu_content_alt start="<ins>" end="</ins>" skip="\\\\\|\\'" oneline
|
||||
syn region sisu_identifier contains=sisu_error matchgroup=sisu_content_alt start="<del>" end="</del>" oneline
|
||||
syn region sisu_html contains=sisu_error contains=sisu_strikeout matchgroup=sisu_contain start="<a href=\".\{-}\">" end="</a>" oneline
|
||||
"% single words bold italicise etc. "workon
|
||||
syn region sisu_control contains=sisu_error matchgroup=sisu_control start="\([ (]\|^\)\*[^\|{\n\~\\]"hs=e-1 end="\*"he=e-0 skip="[a-zA-Z0-9']" oneline
|
||||
syn region sisu_identifier contains=sisu_error matchgroup=sisu_content_alt start="\([ ]\|^\)/[^{ \|\n\\]"hs=e-1 end="/\[ \.\]" skip="[a-zA-Z0-9']" oneline
|
||||
"syn region sisu_underline matchgroup=sisu_underline start="\([ (]\|^\)_\([^ !*{\\][\w]\|[^12][^*]\)"hs=e-2 end="\(_\([ )\.]\|$\)\| \)"he=e-1 skip="[a-zA-Z0-9']" oneline
|
||||
"% html
|
||||
syn region sisu_number contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell,sisu_mark matchgroup=sisu_contain start="<b>" end="</b>" skip="\n"
|
||||
syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell,sisu_mark matchgroup=sisu_contain start="<i>" end="</i>" skip="\n"
|
||||
syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell,sisu_mark matchgroup=sisu_contain start="<u>" end="</u>" skip="\n"
|
||||
syn region sisu_number contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell,sisu_mark matchgroup=sisu_html start="<b>" end="</b>" skip="\n" oneline
|
||||
syn region sisu_number contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell,sisu_mark matchgroup=sisu_html start="<em>" end="</em>" oneline
|
||||
syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell,sisu_mark matchgroup=sisu_html start="<i>" end="</i>" skip="\n" oneline
|
||||
syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell,sisu_mark matchgroup=sisu_html start="<u>" end="</u>" skip="\n" oneline
|
||||
syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell,sisu_mark matchgroup=sisu_html start="<ins>" end="</ins>" skip="\\\\\|\\'" oneline
|
||||
syn region sisu_identifier contains=sisu_error matchgroup=sisu_html start="<del>" end="</del>" oneline
|
||||
"% misc
|
||||
syn region sisu_identifier contains=sisu_error matchgroup=sisu_content_alt start="\^[^{\|\n\\]" end="\^[ ,.;:'})\\\n]" skip="[a-zA-Z0-9']" oneline
|
||||
syn region sisu_identifier contains=sisu_error matchgroup=sisu_fontface start="\^[^ {\|\n\\]"rs=s+1 end="\^[ ,.;:'})\\\n]" skip="[a-zA-Z0-9']" oneline
|
||||
"% metaverse
|
||||
syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell matchgroup=sisu_contain start="<:Table.\{-}>" end="<:Table[-_]end>"
|
||||
syn region sisu_content_alt contains=sisu_error matchgroup=sisu_contain start="<:code>" end="<:code[-_]end>"
|
||||
@ -101,8 +93,7 @@ else " not Expensive
|
||||
syn region sisu_content_alt matchgroup=sisu_control start="^\s*def\s" matchgroup=NONE end="[?!]\|\>" skip="\.\|\(::\)" oneline
|
||||
endif " Expensive?
|
||||
"% 5 Headers: and Headings (Document Instructions)
|
||||
"syn match sisu_header contains=sisu_error,sisu_error_wspace,sisu_mark "0\~.*"
|
||||
syn match sisu_comment contains=sisu_error "^% .*\|^%% .*"
|
||||
syn match sisu_comment "^% .*\|^%% .*"
|
||||
syn match sisu_control contains=sisu_error,sisu_error_wspace "4\~! \S\+"
|
||||
syn region sisu_markpara contains=sisu_error,sisu_error_wspace start="^=begin" end="^=end.*$"
|
||||
"% 4 Errors?
|
||||
@ -110,6 +101,7 @@ syn match sisu_error_wspace contains=sisu_error_wspace "^\s\+"
|
||||
syn match sisu_error_wspace contains=sisu_error_wspace "\s\s\+"
|
||||
syn match sisu_error_wspace contains=sisu_error_wspace " \s*$"
|
||||
syn match sisu_error contains=sisu_error,sisu_error_wspace "[^ (}]http:\S\+"
|
||||
syn match sisu_error contains=sisu_error_wspace "\t\+"
|
||||
syn match sisu_error contains=sisu_error "http:\S\+[}><]"
|
||||
syn match sisu_error contains=sisu_error "\([!*/_\+,^]\){\([^(\}\1)]\)\{-}\n\n"
|
||||
syn match sisu_error contains=sisu_error "^[\-\~]{[^{]\{-}\n\n"
|
||||
@ -139,8 +131,11 @@ if version >= 508 || !exists("did_sisu_syntax_inits")
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
"% 1 Defined
|
||||
HiLink sisu_normal Normal
|
||||
HiLink sisu_header PreProc
|
||||
HiLink sisu_header_content Statement
|
||||
HiLink sisu_heading Title
|
||||
HiLink sisu_structure Operator
|
||||
HiLink sisu_contain Include
|
||||
HiLink sisu_mark_endnote Include
|
||||
HiLink sisu_link NonText
|
||||
@ -151,7 +146,6 @@ if version >= 508 || !exists("did_sisu_syntax_inits")
|
||||
HiLink sisu_content_endnote Special
|
||||
HiLink sisu_control Define
|
||||
HiLink sisu_ocn Include
|
||||
HiLink sisu_digest Identifier
|
||||
HiLink sisu_number Number
|
||||
HiLink sisu_identifier Function
|
||||
HiLink sisu_underline Underlined
|
||||
@ -165,8 +159,6 @@ if version >= 508 || !exists("did_sisu_syntax_inits")
|
||||
HiLink sisu_error_spell SpellErrors "line does nothing
|
||||
HiLink sisu_error_wspace Error
|
||||
HiLink sisu_error Error
|
||||
"HiLink sisu_ Statement
|
||||
"HiLink sisu_ Operator
|
||||
delcommand HiLink
|
||||
endif
|
||||
let b:current_syntax = "sisu"
|
||||
|
21
src/gui.c
21
src/gui.c
@ -591,7 +591,7 @@ gui_init()
|
||||
/* When 'cmdheight' was set during startup it may not have taken
|
||||
* effect yet. */
|
||||
if (p_ch != 1L)
|
||||
command_height(-1L);
|
||||
command_height();
|
||||
|
||||
return;
|
||||
}
|
||||
@ -3497,6 +3497,25 @@ send_tabline_event(nr)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Send a tabline menu event
|
||||
*/
|
||||
void
|
||||
send_tabline_menu_event(tabidx, event)
|
||||
int tabidx;
|
||||
int event;
|
||||
{
|
||||
char_u string[3];
|
||||
|
||||
string[0] = CSI;
|
||||
string[1] = KS_TABMENU;
|
||||
string[2] = KE_FILLER;
|
||||
add_to_input_buf(string, 3);
|
||||
string[0] = tabidx;
|
||||
string[1] = (char_u)(long)event;
|
||||
add_to_input_buf_csi(string, 2);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -3128,16 +3128,9 @@ static int clicked_page; /* page clicked in tab line */
|
||||
static void
|
||||
tabline_menu_handler(GtkMenuItem *item, gpointer user_data)
|
||||
{
|
||||
char_u string[3];
|
||||
|
||||
/* Add the string cmd into input buffer */
|
||||
string[0] = CSI;
|
||||
string[1] = KS_TABMENU;
|
||||
string[2] = KE_FILLER;
|
||||
add_to_input_buf(string, 3);
|
||||
string[0] = clicked_page;
|
||||
string[1] = (char_u)(long)user_data;
|
||||
add_to_input_buf_csi(string, 2);
|
||||
send_tabline_menu_event(clicked_page, (int)(long)user_data);
|
||||
|
||||
if (gtk_main_level() > 0)
|
||||
gtk_main_quit();
|
||||
|
109
src/gui_motif.c
109
src/gui_motif.c
@ -27,6 +27,7 @@
|
||||
#include <Xm/ToggleBG.h>
|
||||
#include <Xm/SeparatoG.h>
|
||||
#include <Xm/Notebook.h>
|
||||
#include <Xm/XmP.h>
|
||||
|
||||
#include <X11/keysym.h>
|
||||
#include <X11/Xatom.h>
|
||||
@ -151,19 +152,52 @@ tabline_button_cb(w, client_data, call_data)
|
||||
Widget w;
|
||||
XtPointer client_data, call_data;
|
||||
{
|
||||
char_u string[3];
|
||||
int cmd, tab_idx;
|
||||
|
||||
XtVaGetValues(w, XmNuserData, &cmd, NULL);
|
||||
XtVaGetValues(tabLine_menu, XmNuserData, &tab_idx, NULL);
|
||||
|
||||
string[0] = CSI;
|
||||
string[1] = KS_TABMENU;
|
||||
string[2] = KE_FILLER;
|
||||
add_to_input_buf(string, 3);
|
||||
string[0] = tab_idx;
|
||||
string[1] = (char_u)(long)cmd;
|
||||
add_to_input_buf_csi(string, 2);
|
||||
send_tabline_menu_event(tab_idx, cmd);
|
||||
}
|
||||
|
||||
/*
|
||||
* Tabline single mouse click timeout handler
|
||||
*/
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
motif_tabline_timer_cb (timed_out, interval_id)
|
||||
XtPointer timed_out;
|
||||
XtIntervalId *interval_id;
|
||||
{
|
||||
*((int *)timed_out) = TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* check if the tabline tab scroller is clicked
|
||||
*/
|
||||
static int
|
||||
tabline_scroller_clicked(scroller_name, event)
|
||||
char *scroller_name;
|
||||
XButtonPressedEvent *event;
|
||||
{
|
||||
Widget tab_scroll_w;
|
||||
Position pos_x, pos_y;
|
||||
Dimension width, height;
|
||||
|
||||
tab_scroll_w = XtNameToWidget(tabLine, scroller_name);
|
||||
if (tab_scroll_w != (Widget)0) {
|
||||
XtVaGetValues(tab_scroll_w, XmNx, &pos_x, XmNy, &pos_y, XmNwidth,
|
||||
&width, XmNheight, &height, NULL);
|
||||
if (pos_x >= 0) {
|
||||
/* Tab scroller (next) is visible */
|
||||
if ((event->x >= pos_x) && (event->x <= pos_x + width) &&
|
||||
(event->y >= pos_y) && (event->y <= pos_y + height)) {
|
||||
/* Clicked on the scroller */
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
@ -179,15 +213,47 @@ tabline_menu_cb(w, closure, e, continue_dispatch)
|
||||
int tab_idx = 0;
|
||||
WidgetList children;
|
||||
Cardinal numChildren;
|
||||
static XtIntervalId timer = (XtIntervalId)0;
|
||||
static int timed_out = TRUE;
|
||||
|
||||
event = (XButtonPressedEvent *)e;
|
||||
|
||||
if (event->button == Button1)
|
||||
{
|
||||
if (tabline_scroller_clicked("MajorTabScrollerNext", event)
|
||||
|| tabline_scroller_clicked("MajorTabScrollerPrevious", event))
|
||||
return;
|
||||
|
||||
if (!timed_out)
|
||||
{
|
||||
XtRemoveTimeOut(timer);
|
||||
timed_out = TRUE;
|
||||
|
||||
/*
|
||||
* Double click on the tabline gutter, add a new tab
|
||||
*/
|
||||
send_tabline_menu_event(0, TABLINE_MENU_NEW);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Single click on the tabline gutter, start a timer to check
|
||||
* for double clicks
|
||||
*/
|
||||
timer = XtAppAddTimeOut(app_context, (long_u)p_mouset,
|
||||
motif_tabline_timer_cb, &timed_out);
|
||||
timed_out = FALSE;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (event->button != Button3)
|
||||
return;
|
||||
|
||||
if (event->subwindow != None)
|
||||
{
|
||||
tab_w = XtWindowToWidget(XtDisplay(w), event->subwindow);
|
||||
/* LINTED: avoid warning: dubious operation on enum */
|
||||
if (tab_w != (Widget)0 && XmIsPushButton(tab_w))
|
||||
XtVaGetValues(tab_w, XmNpageNumber, &tab_idx, NULL);
|
||||
}
|
||||
@ -3169,6 +3235,9 @@ gui_mch_show_tabline(int showit)
|
||||
{
|
||||
XtManageChild(tabLine);
|
||||
XtUnmanageChild(XtNameToWidget(tabLine, "PageScroller"));
|
||||
XtUnmanageChild(XtNameToWidget(tabLine, "MinorTabScrollerNext"));
|
||||
XtUnmanageChild(XtNameToWidget(tabLine,
|
||||
"MinorTabScrollerPrevious"));
|
||||
#ifdef FEAT_MENU
|
||||
# ifdef FEAT_TOOLBAR
|
||||
if (XtIsManaged(XtParent(toolBar)))
|
||||
@ -3237,6 +3306,8 @@ gui_mch_update_tabline(void)
|
||||
XmNotebookPageInfo page_info;
|
||||
XmNotebookPageStatus page_status;
|
||||
int last_page, tab_count;
|
||||
XmString label_str;
|
||||
char *label_cstr;
|
||||
|
||||
if (tabLine == (Widget)0)
|
||||
return;
|
||||
@ -3265,9 +3336,25 @@ gui_mch_update_tabline(void)
|
||||
tab = page_info.major_tab_widget;
|
||||
|
||||
XtVaSetValues(tab, XmNpageNumber, nr, NULL);
|
||||
get_tabline_label(tp);
|
||||
XtVaSetValues(tab, XtVaTypedArg, XmNlabelString, XmRString,
|
||||
NameBuff, STRLEN(NameBuff) + 1, NULL);
|
||||
|
||||
/*
|
||||
* Change the label text only if it is different
|
||||
*/
|
||||
XtVaGetValues(tab, XmNlabelString, &label_str, NULL);
|
||||
if (XmStringGetLtoR(label_str, XmSTRING_DEFAULT_CHARSET, &label_cstr))
|
||||
{
|
||||
get_tabline_label(tp);
|
||||
if (STRCMP(label_cstr, NameBuff) != 0) {
|
||||
XtVaSetValues(tab, XtVaTypedArg, XmNlabelString, XmRString,
|
||||
NameBuff, STRLEN(NameBuff) + 1, NULL);
|
||||
/*
|
||||
* Force a resize of the tab label button
|
||||
*/
|
||||
XtUnmanageChild(tab);
|
||||
XtManageChild(tab);
|
||||
}
|
||||
XtFree(label_cstr);
|
||||
}
|
||||
}
|
||||
|
||||
tab_count = nr - 1;
|
||||
|
@ -740,17 +740,7 @@ _WndProc(
|
||||
GetCursorPos((LPPOINT)&pt);
|
||||
GetWindowRect(s_textArea, &rect);
|
||||
if (pt.y < rect.top)
|
||||
{
|
||||
char_u string[3];
|
||||
|
||||
string[0] = CSI;
|
||||
string[1] = KS_TABMENU;
|
||||
string[2] = KE_FILLER;
|
||||
add_to_input_buf(string, 3);
|
||||
string[0] = 0;
|
||||
string[1] = (char_u)(long)TABLINE_MENU_NEW;
|
||||
add_to_input_buf_csi(string, 2);
|
||||
}
|
||||
send_tabline_menu_event(0, TABLINE_MENU_NEW);
|
||||
}
|
||||
return MyWindowProc(hwnd, uMsg, wParam, lParam);
|
||||
}
|
||||
|
@ -1120,6 +1120,7 @@ gui_mch_set_text_area_pos(int x, int y, int w, int h)
|
||||
if (showing_tabline)
|
||||
{
|
||||
int top = 0;
|
||||
RECT rect;
|
||||
|
||||
#ifdef FEAT_TOOLBAR
|
||||
if (vim_strchr(p_go, GO_TOOLBAR) != NULL)
|
||||
@ -2191,7 +2192,6 @@ show_tabline_popup_menu(void)
|
||||
MENUITEMINFO minfo;
|
||||
long rval;
|
||||
POINT pt;
|
||||
char_u string[3];
|
||||
|
||||
tab_pmenu = CreatePopupMenu();
|
||||
if (tab_pmenu == NULL)
|
||||
@ -2236,13 +2236,7 @@ show_tabline_popup_menu(void)
|
||||
else
|
||||
idx += 1;
|
||||
|
||||
string[0] = CSI;
|
||||
string[1] = KS_TABMENU;
|
||||
string[2] = KE_FILLER;
|
||||
add_to_input_buf(string, 3);
|
||||
string[0] = idx;
|
||||
string[1] = (char_u)(long)rval;
|
||||
add_to_input_buf_csi(string, 2);
|
||||
send_tabline_menu_event(idx, (int)rval);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7743,7 +7743,7 @@ set_num_option(opt_idx, varp, value, errbuf, errbuflen, opt_flags)
|
||||
&& !gui.starting
|
||||
#endif
|
||||
)
|
||||
command_height(old_value);
|
||||
command_height();
|
||||
}
|
||||
|
||||
/* when 'updatecount' changes from zero to non-zero, open swap files */
|
||||
|
@ -38,6 +38,7 @@ extern int gui_use_tabline __ARGS((void));
|
||||
extern void gui_update_tabline __ARGS((void));
|
||||
extern void get_tabline_label __ARGS((tabpage_T *tp));
|
||||
extern int send_tabline_event __ARGS((int nr));
|
||||
extern void send_tabline_menu_event __ARGS((int tabidx, int event));
|
||||
extern void gui_remove_scrollbars __ARGS((void));
|
||||
extern void gui_create_scrollbar __ARGS((scrollbar_T *sb, int type, win_T *wp));
|
||||
extern scrollbar_T *gui_find_scrollbar __ARGS((long ident));
|
||||
|
@ -1,59 +1,59 @@
|
||||
/* window.c */
|
||||
extern void do_window __ARGS((int nchar, long Prenum, int xchar));
|
||||
extern int win_split __ARGS((int size, int flags));
|
||||
extern int win_valid __ARGS((win_T *win));
|
||||
extern int win_count __ARGS((void));
|
||||
extern int make_windows __ARGS((int count, int vertical));
|
||||
extern void win_move_after __ARGS((win_T *win1, win_T *win2));
|
||||
extern void win_equal __ARGS((win_T *next_curwin, int current, int dir));
|
||||
extern void close_windows __ARGS((buf_T *buf, int keep_curwin));
|
||||
extern void win_close __ARGS((win_T *win, int free_buf));
|
||||
extern void win_close_othertab __ARGS((win_T *win, int free_buf, tabpage_T *tp));
|
||||
extern void win_free_all __ARGS((void));
|
||||
extern void close_others __ARGS((int message, int forceit));
|
||||
extern void curwin_init __ARGS((void));
|
||||
extern int win_alloc_first __ARGS((void));
|
||||
extern void win_init_size __ARGS((void));
|
||||
extern int win_new_tabpage __ARGS((int after));
|
||||
extern int may_open_tabpage __ARGS((void));
|
||||
extern int make_tabpages __ARGS((int maxcount));
|
||||
extern int valid_tabpage __ARGS((tabpage_T *tpc));
|
||||
extern tabpage_T *find_tabpage __ARGS((int n));
|
||||
extern int tabpage_index __ARGS((tabpage_T *ftp));
|
||||
extern void goto_tabpage __ARGS((int n));
|
||||
extern void goto_tabpage_tp __ARGS((tabpage_T *tp));
|
||||
extern void tabpage_move __ARGS((int nr));
|
||||
extern void win_goto __ARGS((win_T *wp));
|
||||
extern win_T *win_find_nr __ARGS((int winnr));
|
||||
extern void win_enter __ARGS((win_T *wp, int undo_sync));
|
||||
extern win_T *buf_jump_open_win __ARGS((buf_T *buf));
|
||||
extern int win_alloc_lines __ARGS((win_T *wp));
|
||||
extern void win_free_lsize __ARGS((win_T *wp));
|
||||
extern void shell_new_rows __ARGS((void));
|
||||
extern void shell_new_columns __ARGS((void));
|
||||
extern void win_size_save __ARGS((garray_T *gap));
|
||||
extern void win_size_restore __ARGS((garray_T *gap));
|
||||
extern int win_comp_pos __ARGS((void));
|
||||
extern void win_setheight __ARGS((int height));
|
||||
extern void win_setheight_win __ARGS((int height, win_T *win));
|
||||
extern void win_setwidth __ARGS((int width));
|
||||
extern void win_setwidth_win __ARGS((int width, win_T *wp));
|
||||
extern void win_setminheight __ARGS((void));
|
||||
extern void win_drag_status_line __ARGS((win_T *dragwin, int offset));
|
||||
extern void win_drag_vsep_line __ARGS((win_T *dragwin, int offset));
|
||||
extern void win_comp_scroll __ARGS((win_T *wp));
|
||||
extern void command_height __ARGS((long old_p_ch));
|
||||
extern void last_status __ARGS((int morewin));
|
||||
extern int tabline_height __ARGS((void));
|
||||
extern char_u *grab_file_name __ARGS((long count, linenr_T *file_lnum));
|
||||
extern char_u *file_name_at_cursor __ARGS((int options, long count, linenr_T *file_lnum));
|
||||
extern char_u *file_name_in_line __ARGS((char_u *line, int col, int options, long count, char_u *rel_fname, linenr_T *file_lnum));
|
||||
extern char_u *find_file_name_in_path __ARGS((char_u *ptr, int len, int options, long count, char_u *rel_fname));
|
||||
extern int path_with_url __ARGS((char_u *fname));
|
||||
extern int vim_isAbsName __ARGS((char_u *name));
|
||||
extern int vim_FullName __ARGS((char_u *fname, char_u *buf, int len, int force));
|
||||
extern int min_rows __ARGS((void));
|
||||
extern int only_one_window __ARGS((void));
|
||||
extern void check_lnums __ARGS((int do_curwin));
|
||||
extern int win_hasvertsplit __ARGS((void));
|
||||
void do_window __ARGS((int nchar, long Prenum, int xchar));
|
||||
int win_split __ARGS((int size, int flags));
|
||||
int win_valid __ARGS((win_T *win));
|
||||
int win_count __ARGS((void));
|
||||
int make_windows __ARGS((int count, int vertical));
|
||||
void win_move_after __ARGS((win_T *win1, win_T *win2));
|
||||
void win_equal __ARGS((win_T *next_curwin, int current, int dir));
|
||||
void close_windows __ARGS((buf_T *buf, int keep_curwin));
|
||||
void win_close __ARGS((win_T *win, int free_buf));
|
||||
void win_close_othertab __ARGS((win_T *win, int free_buf, tabpage_T *tp));
|
||||
void win_free_all __ARGS((void));
|
||||
void close_others __ARGS((int message, int forceit));
|
||||
void curwin_init __ARGS((void));
|
||||
int win_alloc_first __ARGS((void));
|
||||
void win_init_size __ARGS((void));
|
||||
int win_new_tabpage __ARGS((int after));
|
||||
int may_open_tabpage __ARGS((void));
|
||||
int make_tabpages __ARGS((int maxcount));
|
||||
int valid_tabpage __ARGS((tabpage_T *tpc));
|
||||
tabpage_T *find_tabpage __ARGS((int n));
|
||||
int tabpage_index __ARGS((tabpage_T *ftp));
|
||||
void goto_tabpage __ARGS((int n));
|
||||
void goto_tabpage_tp __ARGS((tabpage_T *tp));
|
||||
void tabpage_move __ARGS((int nr));
|
||||
void win_goto __ARGS((win_T *wp));
|
||||
win_T *win_find_nr __ARGS((int winnr));
|
||||
void win_enter __ARGS((win_T *wp, int undo_sync));
|
||||
win_T *buf_jump_open_win __ARGS((buf_T *buf));
|
||||
int win_alloc_lines __ARGS((win_T *wp));
|
||||
void win_free_lsize __ARGS((win_T *wp));
|
||||
void shell_new_rows __ARGS((void));
|
||||
void shell_new_columns __ARGS((void));
|
||||
void win_size_save __ARGS((garray_T *gap));
|
||||
void win_size_restore __ARGS((garray_T *gap));
|
||||
int win_comp_pos __ARGS((void));
|
||||
void win_setheight __ARGS((int height));
|
||||
void win_setheight_win __ARGS((int height, win_T *win));
|
||||
void win_setwidth __ARGS((int width));
|
||||
void win_setwidth_win __ARGS((int width, win_T *wp));
|
||||
void win_setminheight __ARGS((void));
|
||||
void win_drag_status_line __ARGS((win_T *dragwin, int offset));
|
||||
void win_drag_vsep_line __ARGS((win_T *dragwin, int offset));
|
||||
void win_comp_scroll __ARGS((win_T *wp));
|
||||
void command_height __ARGS((void));
|
||||
void last_status __ARGS((int morewin));
|
||||
int tabline_height __ARGS((void));
|
||||
char_u *grab_file_name __ARGS((long count, linenr_T *file_lnum));
|
||||
char_u *file_name_at_cursor __ARGS((int options, long count, linenr_T *file_lnum));
|
||||
char_u *file_name_in_line __ARGS((char_u *line, int col, int options, long count, char_u *rel_fname, linenr_T *file_lnum));
|
||||
char_u *find_file_name_in_path __ARGS((char_u *ptr, int len, int options, long count, char_u *rel_fname));
|
||||
int path_with_url __ARGS((char_u *fname));
|
||||
int vim_isAbsName __ARGS((char_u *name));
|
||||
int vim_FullName __ARGS((char_u *fname, char_u *buf, int len, int force));
|
||||
int min_rows __ARGS((void));
|
||||
int only_one_window __ARGS((void));
|
||||
void check_lnums __ARGS((int do_curwin));
|
||||
int win_hasvertsplit __ARGS((void));
|
||||
/* vim: set ft=c : */
|
||||
|
@ -1625,6 +1625,8 @@ struct tabpage_S
|
||||
win_T *tp_lastwin; /* last window in this Tab page */
|
||||
long tp_old_Rows; /* Rows when Tab page was left */
|
||||
long tp_old_Columns; /* Columns when Tab page was left */
|
||||
long tp_ch_used; /* value of 'cmdheight' when frame size
|
||||
was set */
|
||||
#ifdef FEAT_GUI
|
||||
int tp_prev_which_scrollbars[3];
|
||||
/* previous value of which_scrollbars */
|
||||
|
@ -35,6 +35,6 @@
|
||||
*/
|
||||
#define VIM_VERSION_NODOT "vim70c"
|
||||
#define VIM_VERSION_SHORT "7.0c"
|
||||
#define VIM_VERSION_MEDIUM "7.0c12 BETA"
|
||||
#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0c12 BETA (2006 Apr 7)"
|
||||
#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0c12 BETA (2006 Apr 7, compiled "
|
||||
#define VIM_VERSION_MEDIUM "7.0c13 BETA"
|
||||
#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0c13 BETA (2006 Apr 8)"
|
||||
#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0c13 BETA (2006 Apr 8, compiled "
|
||||
|
29
src/window.c
29
src/window.c
@ -85,8 +85,6 @@ static void win_new_height __ARGS((win_T *, int));
|
||||
#define NOWIN (win_T *)-1 /* non-exisiting window */
|
||||
|
||||
#ifdef FEAT_WINDOWS
|
||||
static long p_ch_used = 1L; /* value of 'cmdheight' when frame
|
||||
size was set */
|
||||
# define ROWS_AVAIL (Rows - p_ch - tabline_height())
|
||||
#else
|
||||
# define ROWS_AVAIL (Rows - p_ch)
|
||||
@ -3087,9 +3085,6 @@ win_alloc_firstwin(oldwin)
|
||||
topframe->fr_width = Columns;
|
||||
#endif
|
||||
topframe->fr_height = Rows - p_ch;
|
||||
#ifdef FEAT_WINDOWS
|
||||
p_ch_used = p_ch;
|
||||
#endif
|
||||
topframe->fr_win = curwin;
|
||||
curwin->w_frame = topframe;
|
||||
|
||||
@ -3137,6 +3132,7 @@ alloc_tabpage()
|
||||
/* init t: variables */
|
||||
init_var_dict(&tp->tp_vars, &tp->tp_winvar);
|
||||
#endif
|
||||
tp->tp_ch_used = p_ch;
|
||||
}
|
||||
return tp;
|
||||
}
|
||||
@ -3419,7 +3415,9 @@ enter_tabpage(tp, old_curbuf)
|
||||
|
||||
/* The tabpage line may have appeared or disappeared, may need to resize
|
||||
* the frames for that. When the Vim window was resized need to update
|
||||
* frame sizes too. */
|
||||
* frame sizes too. Use the stored value of p_ch, so that it can be
|
||||
* different for each tab page. */
|
||||
p_ch = curtab->tp_ch_used;
|
||||
if (curtab->tp_old_Rows != Rows || (old_off != firstwin->w_winrow
|
||||
#ifdef FEAT_GUI_TABLINE
|
||||
&& !gui_use_tabline()
|
||||
@ -4215,7 +4213,7 @@ shell_new_rows()
|
||||
#endif
|
||||
compute_cmdrow();
|
||||
#ifdef FEAT_WINDOWS
|
||||
p_ch_used = p_ch;
|
||||
curtab->tp_ch_used = p_ch;
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
@ -4961,6 +4959,7 @@ win_drag_status_line(dragwin, offset)
|
||||
p_ch = Rows - cmdline_row;
|
||||
if (p_ch < 1)
|
||||
p_ch = 1;
|
||||
curtab->tp_ch_used = p_ch;
|
||||
redraw_all_later(SOME_VALID);
|
||||
showmode();
|
||||
}
|
||||
@ -5257,19 +5256,17 @@ win_comp_scroll(wp)
|
||||
* command_height: called whenever p_ch has been changed
|
||||
*/
|
||||
void
|
||||
command_height(old_p_ch)
|
||||
long old_p_ch;
|
||||
command_height()
|
||||
{
|
||||
#ifdef FEAT_WINDOWS
|
||||
int h;
|
||||
frame_T *frp;
|
||||
int old_p_ch = curtab->tp_ch_used;
|
||||
|
||||
/* When passed a negative value use the value of p_ch that we remembered.
|
||||
* This is needed for when the GUI starts up, we can't be sure in what
|
||||
* order things happen. */
|
||||
if (old_p_ch < 0)
|
||||
old_p_ch = p_ch_used;
|
||||
p_ch_used = p_ch;
|
||||
/* Use the value of p_ch that we remembered. This is needed for when the
|
||||
* GUI starts up, we can't be sure in what order things happen. And when
|
||||
* p_ch was changed in another tab page. */
|
||||
curtab->tp_ch_used = p_ch;
|
||||
|
||||
/* Find bottom frame with width of screen. */
|
||||
frp = lastwin->w_frame;
|
||||
@ -5328,8 +5325,8 @@ command_height(old_p_ch)
|
||||
if (frp != lastwin->w_frame)
|
||||
(void)win_comp_pos();
|
||||
#else
|
||||
win_setheight((int)(firstwin->w_height + old_p_ch - p_ch));
|
||||
cmdline_row = Rows - p_ch;
|
||||
win_setheight(cmdline_row);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user