version6

version6.txt 适用于 Vim 9.0 版本。 最近更新: 2022年7月 VIM 参考手册 by Bram Moolenaar 译者: Willis 欢迎来到 Vim 6.0 版本!新版本增加了很多新特性。本文档列出所有加入的新项目、已 有特性的改动以及 Vim 5.x 的漏洞修正。 vi_diff.txt 提供 Vi 和 Vim 6.0 的区别的一个概述。 version4.txt 说明 Vim 3.0 和 Vim 4.0 的区别。 version5.txt 说明 Vim 4.0 和 Vim 5.0 的区别。 不 兼 容 的 改 动 incompatible-6 可视模式的光标位置 curpos-visual 替代命令与 Vi 兼容 substitute-CR 引入全局选项值 new-global-values 改变 'fileencoding' fileencoding-changed 改变二合字母 digraphs-changed 改变文件类型检测 filetypedetect-changed 引入列表外缓冲区 new-unlisted-buffers 改变命令行模式的 CTRL-U CTRL-U-changed 去掉 Ctags ctags-gone 重新调整文档 documentation-6 无模式选择和剪贴板 modeless-and-clipboard 细小的不兼容之处 incomp-small-6 新 特 性 new-6 折叠 new-folding 垂直分割窗口 new-vertsplit 比较模式 new-diff-mode 简易 Vim: 点击-输入 new-evim 用户手册 new-user-manual 灵活的缩进方式 new-indent-flex 扩展的搜索模式 new-searchpat UTF-8 支持 new-utf-8 多语言支持 new-multi-lang 插件支持 new-plugins 文件类型插件 new-filetype-plugins 文件浏览器 new-file-browser 在网络上编辑文件 new-network-files 命令行编辑的窗口 new-cmdwin 调试模式 new-debug-mode 虚拟位置的光标 new-virtedit 调试器接口 new-debug-itf Vim 间的通信 new-vim-server 缓冲区类型选项 new-buftype 打印 new-printing 移植版本 ports-6 扩展的快速修复 quickfix-6 操作符修饰符 new-operator-mod 搜索路径 new-search-path 改进文件写入 new-file-writing 参数列表 new-argument-list 恢复视图 new-View 色彩方案 new-color-schemes 若干新项目 new-items-6 改 进 improvements-6 编 译 时 的 改 变 compile-changes-6 漏 洞 修 正 bug-fixes-6 6.1 版 本 version-6.1 改动 changed-6.1 新增 added-6.1 修正 fixed-6.1 6.2 版 本 version-6.2 改动 changed-6.2 新增 added-6.2 修正 fixed-6.2 6.3 版 本 version-6.3 改动 changed-6.3 新增 added-6.3 修正 fixed-6.3 6.4 版 本 version-6.4 改动 changed-6.4 新增 added-6.4 修正 fixed-6.4 (译者注: 各版本的修正一节,因内容过于琐碎,保留原文未翻译)

不 兼 容 的 改 动 incompatible-6

这些改动和以前的发布版本不兼容。如果你从 Vim 5.x 升级到 6.0 时遇到问题,检查此 列表。 可视模式的光标位置 curpos-visual

在可视模式里,如果从同一缓冲区的一个窗口跳到另一个窗口,另一个窗口的光标位置被 调整,以维持相同的可视区域。这可以用来在一个窗口设置可视区域的开始,而在另一个 窗口里设置可视区域的结束。vim 5.x 里会使用另一个窗口的光标位置,它可以在任何地 方,从而不是十分有用。 替代命令与 Vi 兼容 substitute-CR

替代字符串 (substitute 命令的 "to" 部分) 现在和 Vi 兼容。以前,CTRL-V 有特殊含 义,可以用来防止 <CR> 插入换行符。这使得在换行符之前无法插入 CTRL-V。现在使用 反斜杠来防止 <CR> 产生换行符。因为通过反斜杠数量减半,仍然可能在行尾插入换行符 (译者注: 似应为反斜杠)。这和 Vi 类似,但和 6.0 之前的 Vim 版本不兼容。 如果 ":s" 命令不进行任何替代,它不再设置 '[ 和 '] 位置标记。这和 Vi 无关,因为 它没有这些位置标记。 引入全局选项值 new-global-values

现在,局部于缓冲区或者窗口的选项有了全局值。以前,局部选项从一个缓冲区复制到另 一个。如果编辑另一个文件,可能导致模式行的选项值用在错误的文件上。现在进入以前 没有使用过的缓冲区会使用全局值。另外,如果在一个窗口里编辑另一个缓冲区,窗口的 局部变量被复位到它们的全局值上。":set" 命令同时设置局部和全局值,这仍然是兼容 的行为。但模式行只会设置局部值,这与后向不兼容。 现在,":let &opt = val" 设置局部和全局值,类似于 ":set"。加入新的命令,以分别 设置全局或局部值: :let &opt = val 类似于 ":set" :let &g:opt = val 类似于 ":setglobal" :let &l:opt = val 类似于 ":setlocal" 改变 'fileencoding' fileencoding-changed

在 Vim 5.x 里,'fileencoding' 用来设置 Vim 里所有的编码。这有点奇怪,因为它是 局部于缓冲区的,但它影响所有的缓冲区。不同缓冲区不可能有不一样,因为它改变了所 有缓冲区的文本的解释方式。 现在,它被用作缓冲区相关文件的编码。如果你仍然设置 'fileencoding',它可能被 'fileencodings' 检测到的编码替代,因而是 "基本上无害的"。 旧的 FileEncoding 自动命令现在和新的 EncodingChanged 事件相同。 改变二合字母 digraphs-changed

缺省的二合字母现在和 RFC1345 对应。这和 Vim 5.x 使用的非常不同。 digraphs 改变文件类型检测 filetypedetect-changed

过去,文件类型检测使用 "filetype" 自动命令组。这和 FileType 事件名混淆 (大小写 是忽略的)。现在,该组叫做 "filetypedetect"。旧的名字仍然可以用,但如果使用了 "filetype" 组,":filetype off" 不会删除里面的自动命令。 'runtimepath' 的支持使得 "myfiletypefile" 和 "mysyntaxfile" 机制被废弃。为 了后向兼容,它们仍然保留。 FileType 事件和 'syntax' 选项的设置之间的联系,以前在 "syntax" 自动命令组里设 置。这和 Syntax 事件名有混淆。该组现在叫 "syntaxset"。 发布的语法文件不再包含 "syntax clear"。这使得在一个文件包含另一个文件不再需要 什么技巧。现在,语法的清理在设置 'syntax' 选项时进行 (通过 synload.vim 里加入 的自动命令)。这使得 'syntax' 的值不对应语法文件时进行语法清理。以前则保留已有 的高亮。 引入列表外缓冲区 new-unlisted-buffers

现在缓冲区有不出现在缓冲区列表和实际不在缓冲区列表的区别。":ls"、":bnext"、 ":blast" 和 Buffers 菜单的命令会跳过不出现在缓冲区列表的缓冲区。 unlisted-buffer 'buflisted' 选项可以用来决定缓冲区是否出现在缓冲区列表里。 以前把缓冲区加到缓冲区列表的一些命令现在会建立列表外缓冲区。这意味着 ":bnext" 和 ":ball" 不会找到这些文件,除非实际开始编辑。比如,":write file" 和 ":read file" 的轮换文件使用的缓冲区。 别的命令以前完全删除缓冲区,而现在只从缓冲区列表里删除缓冲区。依赖于缓冲区 不存在的命令可能会失败。例如,自动命令里用了 ":bdelete" 命令,该自动命令可能会 依赖于其后发生的事情会失败 (过去用于自动测试里)。 :bwipeout 可以用来实现 ":bdelete" 的旧含义。 BufDelete 自动命令事件现在当从缓冲区列表里删除缓冲区时激活。BufCreate 事件则在 缓冲区列表里加入了新建立或者已有的缓冲区时激活。BufAdd 是 BufCreate 的新名字。 新的 BufNew 事件用于任何缓冲区的建立,而 BufWipeout 用于真正地删除缓冲区。 如果进行插入模式的补全,只有缓冲区列表里的缓冲区被扫描。在 'complete' 里加入 'U' 标志位可以从列表外缓冲区中寻找补全。 列表外缓冲区不会在 viminfo 文件里保存。 改变命令行模式的 CTRL-U CTRL-U-changed

编辑命令行时,CTRL-U 过去清除整行。多数外壳里,它只清除光标之前的字符。现在使 其行为类似于此。(Steve Wall) 你可以用 CTRL-E CTRL-U 得到旧的行为: :cnoremap <C-U> <C-E><C-U> 去掉 Ctags ctags-gone

Ctags 不再是 Vim 发布的一部分。现在它自己独立门户,值得自己单独进行发布。 Ctags 可以在这里找到: http://ctags.sf.net/。 重新调整文档 documentation-6

文档现在被重新调整,不一定能在 Vim 5.x 相同的位置里找到每个项目。 - 加入了用户手册,有些项目被移到了参考手册。 - 快速参考指南现在放到了单独文件里 (以便打印)。 文档里的示例以前用第一列的 ">" 标出。它增加了复制/粘贴这些示例的困难。现在示 例以单个 ">" 开始,而以第一列出现的 "<" 或非空白结束。这使得没有高亮的时候看 起来好一些。 不再用 'helpfile' 找到帮助标签文件。这使得用户可以加入自己的帮助文件 (比如,插 件的文档)。 无模式选择和剪贴板 modeless-and-clipboard

无模式的选择用来在无法使用可视模式时,例如在编辑命令行时或者在 more 提示时。选 择文本。 Vim 5.x 里,总是使用无模式的选择。MS-Windows 上,这导致剪贴板被覆盖,而且没有 办法避免。现在,无模式的选择由 'guioptions' 里的 'a' 和 'A' 标志位以及 'clipboard' 里的 "autoselect" 和 "autoselectml" 控制。缺省,在 MS-Windows 上没 有自动复制。用 c_CTRL-Y 命令手动复制选择区。 要得到旧的行为,可以这么做: :set clipboard^=autoselectml guioptions+=A 细小的不兼容之处 incomp-small-6

为了更好的安全性,模式行上不再能设置 'backupdir''cdpath''directory''equalprg''errorfile''formatprg''grepprg''helpfile''makeef''makeprg''keywordprg''cscopeprg''viminfo''runtimepath''breakat' 的缺省删除了 '_': 关键字里经常用到。 'mousehide' 的缺省是打开的,因为这适用于多数人。 Amiga 二进制程序现在总是用 "big" 特性编译。"big" 二进制归档不再存在。 'statusline' 里的 "[RO]"、"[+]"、"[help]"、"[Preview]" 和 "[filetype]" 项目不 再有引导空格。 非 Unix 系统: Vim 参数里扩展通配符时,不使用 'suffixes'。现在它的工作方式就像 外壳扩展了这些参数一样。 'paste' 置位时,'lisp''smartindent''cindent' 选项不关闭。'paste' 置位 时,自动缩进被关闭,但用 "=" 的手动缩进仍然可以工作。 用 "=" 排版时,使用 'cindent''indentexpr' 缩进,如果没有缩进的变动,不作为 改变处理 (不置位 'modified',而且没有什么可撤销的)。 如果设置了 'fileencoding''fileformat',报告 'modified' 为已修改。这样它忠 实地反映了放弃缓冲区是否会丢失改变的可能性。 "Save As" 菜单项目现在编辑要保存的文件。多数人期望它就是如此。 目录的缓冲区不再加到 Buffers 菜单里。 <Return> 被换名为 <Enter>,因为这是多数键盘的称呼方式。这样,现在我们说 hit-enter 提示,而不是 hit-return 提示。 可以就像 <CR><Return> 那样映射 <Enter>。 如果没有置位 'compatible''viminfo' 选项的缺省现在是 '20,"50,h。多数用户希望 使用该功能,包括初学者,但这需要设置该选项,这并不容易。 用了 ":colder" 以后,新的错误列表被覆盖。可用于使用 ":grep" 进行树状方式浏览。 必须使用 ":cnewer 99" 才能得到原来的行为。 'errorformat' 的模式有时会忽略大小写 (MS-Windows),有时又不会 (Unix)。现在,总 是忽略大小写。在模式里加上 "\C" 以匹配大小写。 现在,16 位 MS-DOS 版本编译时不加入 +listcmds 特性 (操作缓冲区列表的命令)。并 不经常需要它们,而这使需要的可执行文件小一些。 现在,'sessionoptions' 缺省包括 "curdir"。这意味着恢复会话会使得当前目录也被恢 复,而不是转到会话文件所在的目录上。 过去,会话删除所有的缓冲区,删除所有的位置标记。现在保持了缓冲区列表,不应该影 响已有的缓冲区的继续存在。 如果参数列表为空,":argdel *" 过去产生错误信息。 不再把标签跳转的搜索模式放到历史里。 不可显示字符的高亮使用 "SpecialKey" 高亮,而不再是 "NonText"。这里的思路是,不 可显示字符或者任何和文件里的字符的显示不同的文本使用 "SpecialKey",而 "NonText" 用于文件里实际不存在的文本。 Motif 的菜单和滚动条现在使用系统的缺省颜色。过去是灰色的。你仍然可以用 ":highlight" 命令和资源设置颜色。 "gq" 的文本排版在非空的空白行上断开段落。过去该行被删除,看来那种方法不怎么有 用。 如果参数在命令未完成时结束,":normal" 不再挂起。 过去 Vim 会等到输入更多的字符,但不刷新屏幕。现在,它假设输入了一个 <Esc>。 工具栏的位图不再从 "$VIM/bitmaps" 里寻找,而是从 'runtimepath' 的 "bitmaps" 目 录下寻找。 现在,hit-enter 提示使用命令行模式的菜单,而不是普通模式的菜单。通常,这样效果 更好,而且允许使用 "Copy" 菜单,以产生 CTRL-Y 莱复制无模式选择区。 字体选择从 Windows 移到了 Edit 菜单,包括其它的设置。 缺省的 'isfname' 包含了更多字符,使得 "gf" 效果更好。 文档的许可证改为 Open Publication License。看起来很公平,因为它包含了 "the Vim book" 的部分内容,而后者也在 OPL 下发行。不利之处是,我们不能再强制销售手册的 人为乌干达作贡献了。 "ayy 之后,不要让 ""yy 或 :let @" = val 覆盖 "a 寄存器。使用无名寄存器代替。 MSDOS: 模式 "*.*" 过去也匹配没有句号的文件名。这和其它版本不一致。 插入模式里,CTRL-O CTRL-\ CTRL-N {cmd} 留在普通模式。过去它会回到插入模式。这 使得 CTRL-\ CTRL-N 的含义不清,因为它应该把我们带到普通模式 (尤其是在 ":amenu" 里)。 允许操作符后面使用 ":" 命令。可以用来实现新的移动命令。它不再中止等待的操作 符。 Amiga 上可以使用 "-d {device}" 参数。如果编译时加入 diff 特性,就不行了。可用 "-dev {device}" 代替。 -dev 插入模式下的 <S-Insert> 缺省映射按本义插入文本,这样避免了 BS 这样的特殊字符产 生副作用。 ":confirm" 过去适用于一行的其余部分。现在只适用于其后的命令。因而, ":confirm if x | edit | endif" 就不行了。 要用 ":if x | confirm edit | endif"。这才是原来的想法,过去的工作方式不同是个 漏洞。

新 特 性 new-6

折叠 new-folding

Vim 现在可以显示文本折叠的缓冲区。能用于快速浏览文件结构。也可以抽出、删除和放 置折叠的文本,比如把函数移动到另一个位置。 有一系列相关的新的命令和选项。见 folding 。 垂直分割窗口 new-vertsplit

窗口也可以垂直分割。这使得窗口可以肩并肩的显示。它很好的一个使用方式是比较两个 相似的文件 (见 new-diff-mode )。'scrollbind' 选项可以用来同步滚动。 垂直分割可以用下面的命令建立: :vsplit 或 CTRL-W v 或 CTRL-W CTRL-V :vsplit :vnew :vnew :vertical {cmd} :vertical 最后一个是修饰符,它对任何分割窗口的命令有意义。比如: :vertical stag main 会垂直分割窗口,然后在新窗口里跳转到标签 "main"。 窗口到窗口的水平切换可以用 CTRL-W_hCTRL-W_l 命令完成。 CTRL-W_kCTRL-W_j 命令被改为跳转到光标位置之上和之下的窗口。 垂直和水平分割可以用你愿意的任何方式组合。如果使用鼠标,改变窗口大小很容易,只 要把指针定位在状态行上或者垂直分割线上然后拖动就可以了。GUI 上,特殊的鼠标指针 形状指示你在哪里可以拖动状态行或分割线。 要改变垂直分割的窗口的大小,用 CTRL-W_<CTRL-W_> 命令。 要使得窗口使用最大宽度,用 CTRL-W | 命令 CTRL-W_bar 。 要强制新窗口使用 Vim 窗口的全部宽度或高度,可以使用这两个修饰符: :topleft {cmd} 新窗口出现在顶部并使用全部宽度,或在左侧并使用 全部高度。 :botright {cmd} 新窗口出现在底部并使用全部宽度,或在右侧并使用 全部高度。 这可以和 ":vertical" 一起使用,来强制垂直分割: :vert bot dsplit DEBUG 会在最右侧打开窗口,占据 Vim 窗口的全部高度,光标在第一个 "DEBUG" 的定义上。 如果当前窗口的宽度不到 80 个字符,帮助窗口在上方打开,就像使用了 ":topleft" 一 样。 若干选项可以用来设置垂直分割窗口的属性。这和已经有的水平的等价命令相类似: 水平 垂直 'splitbelow' 'splitright' 'winheight' 'winwidth' 'winminheight' 'winminwidth' 可以设置 'winminwidth' 为零,使得不用的窗口暂时几乎不占据任何空间,而不用关闭 它们。 新的 'eadirection' 选项指示哪里可以应用 'equalalways': :set eadirection=both 两个方向 :set eadirection=ver 使窗口高度相同 :set eadirection=hor 使窗口宽度相同 可以用来避免在你需要保持窗口大小的时候改变之。 因为垂直分割可以使窗口变得很窄,文本行经常可能放不下。加入了 'sidescrolloff' 选项,使得光标左右可以保留一些上下文。'listchars' 选项被扩展,加入了 "precedes" 项目,它在文本左侧离开屏幕时显示记号,比如说,"<"。(Utz-Uwe Haus) "-O" 命令行参数: 类似于 "-o",但垂直分割窗口。(Scott Urban) 加入命令,使得当前窗口移到最顶部 (CTRL-W K),底部 (CTRL-W J),左侧 (CTRL-W H) 和右侧 (CTRL-W L)。在新的位置上,窗口使用屏幕的完整的宽度/高度。 如果状态行上没有足够的空间同时显示文件名和标尺,标尺使用一半的宽度。用于狭窄的 窗口。 比较模式 new-diff-mode

在比较模式里,Vim 显示两个、三个或四个文件的差异。折叠用来隐藏文件的相同部分。 高亮用来显示删除和改变的行。见 diff-mode 。 启动比较模式的简单方法是用 "vimdiff file1 file2" 启动 Vim。 加入了 vimdiff 手册页面。 在运行中的 Vim 里, :diffsplit 命令用当前文件和另一个文件开始比较模式。 :diffpatch 命令使用当前文件和补丁文件开始比较模式。 :diffthis 命令开始当前 窗口的比较模式。 可以用 :diffget:diffput 命令消除不同之处。 - 'diff' 选项打开窗口的比较模式。 - :diffupdate 命令刷新比较结果。 - 'diffopt' 选项改变差异文的显示方法。 - 'diffexpr' 选项可以设置如何得到比较结果。 - 'patchexpr' 选项可以设置如何把补丁应用到文件上。 - 加入 "diff" 折叠方法。如果打开窗口进入比较模式,设置 'foldlevel' 为零并打开 'foldenable' 可以关闭折叠。 - 加入 DiffAdd、DiffChange、DiffDelete 和 DiffText 高亮组以指定差异文的高亮方 式。缺省设置挺难看的... - Unix: "make install" 里使 vimdiff 成为一个符号链接。 - 从发布里删除现在废弃的 "vimdiff.vim" 脚本。 - 加入 "[c" 和 "]c" 命令,在比较模式里移动到下一个/前一个改变。 简易 Vim: 点击-输入 new-evim

eVim 代表 "Easy Vim" (简易 Vim)。这是一个单独的程序,但也可用 "vim -y" 启动。 Vim 这样启动时,置位 'insertmode',以打开点击-输入的编辑方式。使用 $VIMRUNTIME/evim.vim 脚本加入一些映射和设置一些选项,使得多数行为类似于 Notepad。这是为那些不能忍受两种模式的人专门设计的。 eView 和它一样,但使用只读模式。 GUI 上,CTRL-C 现在只在忙于做事情的时候中断,等待输入的时候不算。可以使用 CTRL-C 来复制文本到剪贴板。 用户手册 new-user-manual

加入了用户手册。它的组织围绕着编辑任务进行。从头到底读起来,就像一本书。它方便 初学者开始学习 Vim,也帮助所有人学习使用最有用的 Vim 特性。它比阅读参考手册容 易得多,但没有提供其中一些细节。见 user-manual 。 用户手册包含了 Steve Oualline 的 "the Vim book" 的部分内容 frombook 。 它在 OPL 下发行 manual-copyright 。 如果没有打开语法高亮,帮助文件里标注示例 ('>' 和 '<') 和头部行 ('~') 的字符被 空格代替。 关闭帮助窗口时,如果窗口布局从那时起没有改变的话,窗口布局恢复为打开帮助之前的 状况。 打开帮助窗口时,如果当前窗口的宽度小于 80 个字符并且不是屏幕的全部宽度,把它放 在 Vim 窗口的顶部。 灵活的缩进方式 new-indent-flex

自动缩进现在可以用于任何语言。它用 Vim 脚本实现,使得缩进的计算非常灵活。 ":filetype indent on" 命令允许使用提供的缩进脚本。用户手册有解释: 30.3 。 计算 'indentexpr' 选项可以得到行的缩进。'indentkeys' 选项指示什么时候重新启动 缩进。通常,这些选项在缩进脚本里设置。就像语法文件一样,缩进脚本也会由很多人提 供和维护。 扩展的搜索模式 new-searchpat

增加了模式匹配多行的可能性。(部分由 Loic Grenie 提供) 搜索模式里增加的用于多行匹配的新项目: \n 匹配行尾,在 [] 里也是 \_[] 匹配范围里的字符还有行尾 \_x 匹配字符类还有行尾 \_. 匹配任何字符还有行尾 \_^ 匹配行首,可以用在正则表达式的任何位置 \_$ 匹配行尾,可以用在正则表达式的任何位置 若干其它搜索模式的新项目: \c 忽略整个模式的大小写 \C 匹配整个模式的大小写 \m 为后面打开 magic \M 为后面关闭 magic \v 使得后面的字符 "非常 magic" \V 使得后面的字符 "非常不 magic" \@! 不匹配前导的匹配原。 例如: "foo\(bar\)\@!" 匹配 "foo " 但不是 "foobar"。 \@= 匹配匹配原,产生零宽度的匹配 例如: "foo\(bar\)\@=" 匹配 "foobar" 里的 "foo"。 \@<! 光标之前不匹配前导的匹配原 \@<= 光标之前匹配前导的匹配原 \@> 作为子表达式匹配前导的匹配原 (不能回溯) \& 只有在前面和后面的分支都匹配的时候才匹配 \%[] 可选的匹配匹配原的列表;"end\%[if]" 匹配 "end"、"endi" 和 "endif" \%(\) 类似于 \(\),但不建立反向引用;可以由任何数量,突破了 \( \) 组对只能有九个的限制 \%^ 匹配文件首 (Chase Tingley) \%$ 匹配文件尾 (Chase Tingley) \%# 匹配光标位置。(Chase Tingley) \? 类似于 "\=",但不能用于 "?" 命令。 \%23l 在第 23 行匹配 \%<23l 在第 23 行前匹配 \%>23l 在第 23 行后匹配 \%23c、\%<23c、\%>23c 在/不到/超过第 23 列处匹配 \%23v、\%<23v、\%>23v 在/不到/超过虚拟第 23 列处匹配 用于语法项目: \z(...\) 设置外部引用匹配 (在区域项目的开始模式里) \z1 - \z9 使用外部引用匹配 (在区域项目的跳过或结束模式里) (Scott Bigham) \zs 使用该位置作为匹配的开始 \ze 使用该位置作为匹配的结束 取消了匹配只能有不超过 32767 次的 *,\+ 等等的限制。 增加了匹配多字节字符的支持。(部分有 Muraoka Taro 提供) 使得 "\<" 和 "\>" 支持 UTF-8。(Muraoka Taro) UTF-8 支持 new-utf-8

Vim 现在可以编辑 UTF-8 编码的文件。可以使用至多 31 位的字符,但只能显示 16 位 字符。支持不超过两个的组合字符,它们叠加在前导字符之上。还支持双宽字符。见 UTF-8 。 也支持 UCS-2、UCS-4 和 UTF-16 编码,它们在内部转换为 UTF-8。还提供在 Latin1 环境下编辑 Unicode 文件的支持。其它的编码使用 iconv() 转换,或者使用 'charconvert' 指定的外部转换器。 有许多多字节支持的新项目: - 加入 'encoding' 选项: 指定 Vim 内使用的字符编码。可以是任何 8 位编码,一些双 字节编码或者是 Unicode。它从环境中初始化,如果找到能支持的值的话。 - 加入 'fileencoding''fileencodings': 指定文件的字符编码,类似于 'fileformat''fileformats'。 如果 'encoding' 为 "utf-8" 而 'fileencodings' 为 "utf-8,latin1",那么如果文 件不是合法的 UTF-8,它被自动切换为 latin1。 - 加入 'bomb' 选项以检测文件开头的 BOM。可以在 'fileencodings' 里指定 "ucs-bom" 以自动判断文件是否以 BOM 开头,从而检测出 Unicode 文件。在 MS-Windows (NT 和 2000) 里尤其有用,因为它使用带 BOM 的 ucs-2le 文件 (比如,注册表的导出文件)。 - 加入 'termencoding' 选项: 指定终端使用的编码。可用于在非 Unicode 的 locale 里把 Vim 置于 utf-8 模式: :let &termencoding = &encoding :set encoding=utf-8 - 如果 'viminfo' 包含 'c' 标志位,viminfo 文件从写入时的 'encoding' 转换为当前 的 'encoding'。 - 加入 ":scriptencoding" 命令: 转换要执行的脚本的文本行到 'encoding' 编码。可 用于菜单文件。 - 加入 'guifontwide' 已指定双宽字符的字体。 - 加入韩语的字符类检测支持。同时修正了 search.c 的 cls()。(Chong-Dae Park) - Win32: 无需 IME 输入多字节字符。(Alexander Smishlajev) - Win32 使用 Mingw: 编译时加入 iconv 库。(Ron Aaron) - Win32 使用 MSVC: 动态载入 iconv.dll 库。(Muraoka Taro) - 可以用 Borland 5.5 编译多字节版本和 iconv 支持。(Yasuhiro Matsumoto) - 加入 'delcombine' 选项: 单独删除组合字符。(Ron Aaron) - "xim" 不需要 "xfontset" 特性。现在,它们是两个独立的特性。 - XIM: 输入语言字符时打开 XIM (插入模式、搜索模式、"f" 或 "r" 命令)。输入普通 模式命令时关闭 XIM。 - XIM 激活时,'showmode' 消息显示 "XIM"。(Nam SungHyun) - 支持 XIM 的 "CursorIM"。(Nam SungHyun) - 'formatoptions' 加入 'm' 标志位: 回绕单词时,允许在每个多字节上分割,而不单 是空格上。 - 使 ":syntax keyword" 能用于多字节字符。 - 加入 Unicode 大写/小写反转和比较的支持。(基于 Raphael Finkel 的补丁) 有第三种写法 ("title case",词首字母大写) 的多字节字符上用 "~" 可以在三种写 法间切换。(Raphael Finkel) 允许为多字节字符定义二合字母。 加入 Unicode 的 RFC1345 二合字母。 多数接受字符参数的普通模式命令,比如 "r"、"t" 和 "f" 现在可以接受二合字母。 'cpoptions' 的 'D' 标志位关闭这一功能,以和 Vi 兼容。 加入语言映射和 'keymap' 以便输入多字节字符: - 加入 ":lmap" 命令和相关设置: 定义输入该文本语言的字符使用的映射,也适用于 "r"、"t" 等。插入和命令行模式下,CTRL-^ 切换映射的开关。 如果没有语言映射的话。CTRL-^ 也切换输入方法 (Input Method) 的使用。可以在输 入一半的时候切换出 IM。 - ":map" 的 "<char-123>" 参数可以指定字符的十进制、八进制和十六进制的值。 - 实现了 'keymap' 选项: 载入键盘映射表文件。用 ":lnoremap" 来定义该键盘映射表 的映射。新的 ":loadkeymap" 命令可以在键盘映射表文件里使用。 - 加入 'statusline' 的 'k' 标志位: 使用键盘映射表时,"b:keymap_name" 或者说 'keymap' 的值。如果没有载入键盘映射表而激活了 ":lmap" 的话,"<lang>"。在缺省 的状态行里也显示此文本。 - 加入 'iminsert''imsearch' 选项: 用选项指定使用的是 langmap 映射和输入方 法。(Muraoka Taro) 加入 'imcmdline' 选项: 如果置位,开始编辑命令行时总是打开输入方法。可用于使 用死键 (dead key) 输入带重音的字符的 XIM。 加入 'imactivatekey' 选项以更好的控制 XIM。(Muraoka Taro) - 输入还没有结束的映射时,在插入模式和命令行模式里,显示光标下的最后一个字符。 对死键字符看起来不错。 - 使得 'langmap' 选项能识别多字节字符。不过映射只能用于 8-位字符。有助于使用 UTF-8。 - ":lmap" 映射激活时,使用不同的光标。可以在 'guicursor' 的每个项目里指定两种 高亮组 (用和不用语言映射)。缺省 "lCursor" 和 "Cursor" 是一样的,用户必须自己 设定他喜欢的颜色。 韩语输入页使用光标颜色。(Sung-Hyun Nam) - 如果语言映射打开,'showmode' 里显示 "(lang)"。 - UTF-8: "r" 可用包含组合字符的 ":lmap"。也适用于 "f,现在可以寻找包含组合字符 的字符。 其它多字节字符的新增特点: - euc-jp 支持双字节单宽度字符: 0x8E 开始的字符。增加 ScreenLines2[] 来保存第二 个字节。 多语言支持 new-multi-lang

Vim 使用的消息可以翻译。已经有几个翻译版本。这里,使用了 gettext 机制。它可以 加入翻译版本而无需重新编译 Vim。 multi-lang (部分由 Marcin Dalecki 提供) 翻译文件在 src/po 目录里。src/po/README.txt 文件解释进行翻译的一些事项。 也可以用翻译的菜单。用新的 :menutranslate 命令。翻译可以在运行时目录 "lang" 里找到。用户因而可以增加翻译。 加入 :language 命令来设置消息、时间和字符类型的语言 (locale)。可以用来在 Vim 里切换语言,而无需离开 Vim 去更改 locale。 可以使用不同语言的 vimtutor。(Eduardo Fernandez) 现在包含了西班牙语 (Eduardo Fernandez)、意大利语 (Antonio Colombo)、日语 (Yasuhiro Matsumoto) 和法语 (Adrien Beau) 的翻译。 加入 "vimtutor.bat": MS-Windows 上,在教学文件上启动 Vim 的脚本。(Dan Sharp) - 加入 v:lang 变量已得到当前的语言设置。(Marcin Dalecki) 还有 v:lc_time 和 v:ctype。 - 可以翻译菜单使用的对话框。使用全局的 "menutrans_" 变量。":menutrans clear" 删除它们。 - 删除了 "有问题的 locale" (Marcin Dalecki)。 - 图标里不使用色彩名,使用 RGB 值。名字可能被翻译。 - Win32: 加入 global IME 支持 (Muraoka) - Win32: 加入动态载入 IME 的支持。 - ":messages" 显示关于谁维护消息或翻译的信息。可用于找到哪里可以给出错误翻译的 意见的相关信息。 - configure 的 --disable-nls 参数: 关闭 gettext() 的使用。(Sung-Hyun Nam) - 加入使用 MingW 编译器的 Win32 版本的 NLS 支持。(Eduardo Fernandez) - 如果可用,调用 bind_textdomain_codeset() 来使得 gettext() 把消息翻译成 'encoding'。这需要 GNU gettext 0.10.36 或其后的版本。 - 加入 Win32 的 gettext 支持。这意味着消息会在设置了 locale 和找到 libintl.dll 的前提下被翻译。(Muraoka Taro) 也可以用于 MingW 编译器的版本。(Eduardo Fernandez) 检测语言并设置 $LANG 已得到合适的翻译过的消息 (如果支持的话)。也用 $LANG 来 选择语言,:lang 是不同类型的名字。 - 使得 gvimext.dll 使用翻译过的消息,如果可能的话。(Yasuhiro Matsumoto) 插件支持 new-plugins

要在启动 Vim 时非常方便地载入 Vim 脚本,可以用 "plugin" 运行时目录。所以这里面 的 "*.vim" 文件被自动载入。Unix 上,缺省使用 "~/.vim/plugin"。'runtimepath' 选 项可以设置在别的目录下查找插件。 load-plugins add-plugin 加入 :runtime 命令以载入一个或多个 'runtimepath' 的文件。 标准插件: netrw.vim - 在网络上编辑文件 new-network-files gzip.vim - 编辑压缩文件 explorer.vim - 浏览目录 new-file-browser 加入本地帮助文件的支持。 add-local-help 。 搜索帮助标签时,使用 'runtimepath' 的 "doc/tags" 的所有文件。 加入 ":helptags" 命令: 为一个帮助目录生成标签文件。 每个帮助文件的第一行被自动 (神奇地) 加到 doc/help.txt 的 "本地附加文档" 一节。 ":map" 加入 <unique> 参数: 只有在没有定义过的时候才加入映射。 设置 'verbose' 以后显示选项值会给出关于该选项最后在哪里设置的消息。对发现什么 脚本设置了选项非常有用。 新的 :scriptnames 命令显示所有执行过的脚本的列表。 GUI: Athena、Motif 和 GTK 版本在 'runtimepath' 的 "bitmaps" 目录里寻找工具栏位 图。可以加入你自己的位图。 文件类型插件 new-filetype-plugins

加入一组新的文件,提供特定文件类型的设置。它们是专用于 'filetype' 某个值的选项 和映射。 这些文件在 "$VIMRUNTIME/ftplugin" 里。'runtimepath' 选项可以使你使用几组不同的 插件: 你自己的、系统范围的、Vim 发布里包含的,等等。 要使之工作,加入了若干特性: - 加入 "s:" 变量,局部于脚本。避免和全局变量的命令冲突。可用于脚本和脚本里定义 的函数、自动命令和用户命令。在同一脚本的多次调用间保持它们的值。 s:var - 加入局部选项的全局值。该值在打开新缓冲区或者编辑另一个文件的时候使用。模式行 或文件类型设置不会带到另一个缓冲区里去。 ":set" 同时设置局部和全局值。 ":setlocal" 只设置局部选项值。 ":setglobal" 设置和显示局部选项的全局值。 ":setlocal name<" 设置局部选项为其全局值。 - 加入一些全局选项的局部于缓冲区的值: 'equalprg''makeprg''errorformat''grepprg''path''dictionary''thesaurus''tags''include''define'。可以设置这些全局选项的局部值,而不会使它不兼容。 - 加入局部于缓冲区的映射和缩写: ":map <buffer>"。 - 映射里可以用 "<Leader>" 得到 "mapleader" 变量的值。这简化了使用 "mapleader" 的映射。"<Leader>" 缺省为 "\"。"<LocalLeader>" 和 "maplocalleader" 相同。它 用在局部于缓冲区的映射里。 - 加入脚本 ID <SID>,定义局部于脚本的函数和映射。 - ":noremap" 和 ":noremenu" 加入 <script> 参数: 只重映射局部于脚本的映射。避免 其它脚本的映射的妨碍,但允许使用脚本里定义的映射。 - 用户命令可以局部于缓冲区: ":command -buffer"。 文件类型检测的自动命令使用新的 ":setfiletype" 命令,以避免设置 'filetype' 两 次。 文件浏览器 new-file-browser

编辑目录时,explorer 插件会列出该目录的文件。在文件名上按 <Enter> 编辑该文件。 在目录上按 <Enter> 切换浏览器到该目录里。 有若干其它的可能,比如在预览窗口里打开文件,给文件换名或者删除文件。 在网络上编辑文件 new-network-files

scp://、rcp://、ftp:// 和 http:// 开始的文件被识别为远程文件。使用指定的方法, 作出相应的尝试以取得该文件。http:// 只能读取,其他的方法也支持写入。这里,使用 了标准 "插件" netrw.vim 脚本。 netrw 使得 "gf" 可用于 URL 上。它不再假设该文件是在本地计算机上的 (多数也不会工作, 因为需要完整路径)。为此,调整了 test2。 允许在 'path' 里使用 URL。使得 ":find index.html" 可以工作。 GTK: 允许在 Vim 上放置 (drop) http:// 和 ftp:// URL。netrw 插件会处理文件的下 载。(Mikael Berthe) 命令行编辑的窗口 new-cmdwin

命令行窗口可以使用普通模式和插入模式的命令来编辑命令行。打开的时候,它包含历史 记录。从而可以从以前的命令行上复制部分内容。 cmdwin 命令行窗口可以从命令行上用 'cedit' 选项指定的键打开 (类似于 Nvi)。也可以直接在 普通模式里用 "q:"、"q/" 和 "q?" 打开。 'cmdwinheight' 指定该窗口的初始高度。 插入模式里,CTRL-X CTRL-V 补全 Ex 命令行,就像命令行所做的那样。可以用来编写 Vim 脚本! 另外,还有 "增强的 Ex 模式"。Vim 以 "exim" 或 "vim -E" 启动,或者使用 "gQ" 命 令都可以进入该模式。就像重复使用 ":" 命令一样,提供完整的命令行编辑和补全功 能。(Ulf Carlsson) 调试模式 new-debug-mode

在调试模式里,脚本和用户函数的执行可以逐行进行。提供跳过 (step over) 或跳入 (step into) 命令的命令。 debug-mode 可以设置断点,使得继续运行,直到在脚本或用户函数的特定行上停止。 :breakadd 调试可以用 ":debug {cmd}" 开始,它调试执行该命令时发生了什么事。启动时,可以用 -D 参数来调试。 虚拟位置的光标 new-virtedit

加入 'virtualedit' 选项: 插入模式、可视模式或任何情况下,可以定位光标到没有实 际字符存在的位置。(Matthias Kramm) 对可视列块模式特别有用。它能定位到区域的没有文本字符的一角。(许多改进由 Chase Tingley 提供) 调试器接口 new-debug-itf

原先,这是为 Sun Visual Workshop 提供的。(Gordon Prieur) 见 debugger.txtsign.txtworkshop.txt 。 加入 ":sign" 命令,定义和放置标号。它们可以显示为两个 ASCII 字符或一个图标。标 号之后的行被高亮显示。可以用来显示断点和当前的 PC 位置。 加入 :wsverb 命令来执行调试器命令。 加入气泡的设置: 'balloondelay''ballooneval' 选项。 加入 ":menu" 的 "icon=" 参数。可以为某个 ToolBar 项目定义特定的图标。 Vim 间的通信 new-vim-server

加入两个 Vim 之间的通信机制。可以从一个 Vim 发送命令到另一个 Vim。支持 X-Windows 和 MS-Windows clientserver 。 用 "--remote" 来用已经运行的 Vim 里编辑文件。 用 "--remote-wait" 来做相同的事,并等待编辑结束。 用 "--remote-send" 从一个 Vim 发送命令给另一个。 用 "--remote-expr" 来在另一个 Vim 里计算表达式。 用 "--serverlist" 列出当前可用的 Vim 服务器。(只限于 X) 还有服务器和客户之间通信的函数。 remote_send() remote_expr() (X-windows 版本由 Flemming Madsen 实现,MS-Windows 版本由 Paul Moore 提供) 在窗口标题里加入命令服务器的名字,使得你可以看到哪个服务器名属于哪个 Vim。 从发布里删除了 OleVim 目录、SendToVim.exe 和 EditWithVim.exe。现在可以用可以 移植的 "gvim --remote" 和 "gvim --remote-send"。 GTK+: 支持在别的窗口里运行 Vim。用 --socketid 参数 (Neil Bird) 缓冲区类型选项 new-buftype

加入了 'buftype''bufhidden' 选项。它们可以设置不同类型的缓冲区。例如: - 'buftype' = "quickfix": 错误列表缓冲区 - 'buftype' = "nofile" 而 'bufhidden' = "delete": 草稿缓冲区,一旦没有窗口显 示,会尽快删除。 'bufhidden' 可以用来否决一个缓冲区的 'hidden' 选项。 这些选项与 'buflisted''swapfile' 的组合提供了使用不同类型的特殊缓冲区的可 能性。见 special-buffers 。 打印 new-printing

包含了第一个 ":hardcopy" 命令的实现,用以打印到纸张上。MS-Windows 上,可以使用 任何安装的打印机。其他系统上,生成 PostScript 文件,可以用 'printexpr' 选项进 行打印。 (MS-Windows 部分由 Vince Negri、Vipin Aravind 提供,PostScript 由 Vince Negri 和 Mike Williams 提供) 使得 ":hardcopy" 可用于多字节字符。(Muraoka Taro,Yasuhiro Matsumoto) 加入选项,微调打印的工作方式: (Vince Negri) - 'printoptions' 定义一些设置。 - 'printheader' 指定页眉格式。'statusline' 加入了 "N" 域,显示页号。 - 'printfont' 指定字体名和属性。 - 'printdevice' 定义 ":hardcopy!" 的缺省打印机。 移植版本 ports-6

OS/390 Unix 的移植版本 (Ralf Schandl) - 很多改动,为了处理 EBCDIC 编码。 - 改变 Ctrl('x') 为 Ctrl_x 定义。 包含 jsbmouse 支持。(Darren Garth) Unix 上支持 dec 鼠标。(Steve Wall) 移植到 16 位 MS-Windows (Windows 3.1x) (Vince Negri) 移植到 QNX。支持 Photon GUI、鼠标等。(Julian Kinraid) 用 Make_ming.mak 可以进行 Win32 版本的跨平台编译。(Ron Aaron) Mingw 的编译加入 Python 支持。(Ron Aaron) 32 位 Dos: 加入 Windows 剪贴板的支持。(David Kotchan) Win32: 动态载入 Perl 和 Python。可以编译 Vim 来使用这些接口,并在运行时寻找这 些 DLL。(Muraoka Taro) 用 Cygwin 编译 Win32 GUI。同时编译 vimrun、dosinst 和 uninstall。(Gerfried) Mac: 使得 Vim 能用 Apple 提供的免费的 MPW 编译器编译。CodeWarrior 的更新。 (Axel Kielhorn) 加入一些类型转换和 ifdef,作为 Vim 在 Win64 上工作的开始 (George Reilly) 扩展的快速修复 quickfix-6

加入 "错误窗口"。它包含了所有的当前错误列表的错误。在一行上按 <Enter> 使得 Vim 跳转到该行上 (在别的窗口里)。这使得错误列表的导航容易得多。 quickfix-window 。 - :copen 打开快速修复窗口。 - :cclose 关闭快速修复窗口。 - :cwindow 只在有识别出来的错误时,才打开快速修复窗口。(Dan Sharp) - 除了 "warning" 和 "error" 类型以外,快速修复也知道 "info"。"%I" 可用来定义多 行信息消息的开始。(Tony Leneis) - 'errorformat' 里的 "%p" 参数可用来得到指针行的列号,其中 "^" 指向该列。 (Stefan Roemer) - DOS/Windows 系统上,'errorformat' 的 "%f" 会在文件名里加入 "c:",即使使用的 是 "%f:"。 操作符修饰符 new-operator-mod

操作符和动作命令之间插入 "v"、"V" 或 CTRL-V 强制该操作符以面向字符、面向行和面 向列块的方式工作。 o_v 搜索路径 new-search-path

Vim 可以在目录树里搜索,不只是往下,也可以往上。 可用于 'path''cdpath''tags' 选项。(Ralf Schandl) 也用于 'tags' 选项的 "**"。(Ralf Schandl) 加入 'includeexpr',用来修改 'include' 选项找到的文件名。 'includeexpr' 也在 "gf" 和 "<cfile>" 里使用,如果找不到未经修改的文件的话。用 于在 include 或 import 语句之后的名字上执行 "gf"。 加入 'cdpath' 选项: 找到 ":cd" 参数的位置。(Raf) 加入 'suffixesadd' 选项: 用 "gf"、"[I" 等命令搜索文件时给文件名附加的后缀。 改进文件写入 new-file-writing

加入 'backupcopy' 选项: 选择文件要通过复制还是换名来建立备份文件。用于在 Unix 上加快写入普通文件的速度。其它系统上,也有助于保留文件属性和编辑 Unix 文件系统 的文件。 加入 'autowriteall' 选项。和 'autowrite' 类似,但用于更多命令。 加入 'backupskip' 选项: 文件名模式的列表,如果匹配,不建立备份。Unix 的缺省值 包含 "/tmp/*",这使得 "crontab -e" 可以工作。 加入 FreeBSD 和 Win32 上的访问控制表 (ACL) 的支持。ACL 从原来的文件复制到新文 件里 (或者备份文件,如果选择它是复制建立的话)。 AIX、Solaris 和通用的 POSIX 也支持 ACL。(Tomas Ogren) SGI 亦然。 参数列表 new-argument-list

参数列表的支持也有了扩展。现在,可以操作参数列表以包含你要包含的文件。 参数列表现在可以局部于窗口。用 :arglocal 命令建立这样的参数列表。 :argglobal 命令可以用来回到全局的参数列表。 :argdo 命令在参数列表的所有文件上执行命令。 用 :argadd 可以把文件名加进参数列表。 :argdelete 可以删除文件名。 "##" 类似于 "#",它被参数列表所有名字的连接替换。用于 ":grep foo ##" 这样的场 合。 :argedit 把文件名加入参数列表,并编辑之。类似于 ":argadd" 然后 ":edit"。 恢复视图 new-View

":mkview" 命令写入 Vim 脚本,包含单个窗口的设置和映射。执行建立的文件可以恢复 该窗口的视图。类似于单个窗口的 ":mksession"。 视图也包含局部参数列表和手动建立的打开或关闭的折叠。 加入 ":loadview" 命令和 'viewdir' 选项: 可以用简单的命令保存和恢复文件的视图。 ":mkview 1" 保存当前文件的视图 1,而 ":loadview 1" 又可以载入。另外,可以在同 一文件的两个视图间快速切换。还可以保存和恢复手动折叠以及折叠的状态。 加入 'viewoptions' 以指定 ":mkview" 的工作方式。 现在,":mksession" 也支持垂直分割。它被进一步改进,以恢复每个窗口的视图。它对 预览和快速修复窗口同样能正确工作。 'sessionoptions' 也用于 ":mkview"。 'sessionoptions' 加入 "curdir" 和 "sesdir"。它们可以选择如何恢复当前目录。 会话文件现在也包含了参数列表。 色彩方案 new-color-schemes

支持载入色彩方案。加入了 ":colorscheme" 命令。 自动为可用的方案加入菜单项。 现在,应该会在 'background''t_Co' 改变时,正确地自动复位色彩。 ":highlight clear" 可以再次设置缺省的颜色。 ":syntax reset" 设置语法高亮颜色为其缺省值。 ":set bg&" 猜测其值。这使得色彩方案可以切换回缺省的颜色。 如果打开了语法高亮时已经定义了色彩方案,该色彩方案被重新载入以 (再次) 定义颜 色。 若干新项目 new-items-6

普通模式命令: "gi" 跳转到 ^ 位置标记并开始插入模式。即使位置标记在行尾之后也可 以。 gi "g'm" 和 "g`m" 跳转到位置标记,而不修改跳转表。现在,你可以用 g`" 来跳回最近 所知的文件位置,而不会有副作用。对映射也有用。 ['、[`、]' 和 ]` 移动光标到下一个/前一个小写的位置标记。 g_ 转到行内的最后的一个非空白。(Steve Wall) 选项: 'autoread' 如果检测到文件在 Vim 之外改变而缓冲区没有改动的话,自动再次读 入缓冲区。它有全局和局部值。用 ":setlocal autoread<" 来回到直 接使用 'autoread' 的全局值的设定。 'debug' 如果设为 "msg",会显示平时忽略的错误消息。用于调试 'indentexpr''foldexpr''lispwords' Lisp 缩进用的单词列表。以前是直接在源代码里编码的。缺省加入了 一些 Lisp 名字。 'fold...' 折叠的许多新选项。 'modifiable' 如果关闭,不能修改缓冲区。'statusline' 的 %m 和 %M 项目显示 '-'。 'previewwindow' 在预览窗口里置位。在会话文件里使用,以标记一窗口为预览窗口。 'printfont' 'printexpr' 'printheader' 'printdevice' 'printoptions' 用于 ":hardcopy"。 'buflisted' 使得缓冲区出现或不出现在缓冲区列表里。 模式行里使用 "vim{version}:" 可以使它只在版本 >= {version} 时才执行。还有 "vim>{version}"、"vim<{version}" 和 "vim={version}"。 Ex 命令: :sav[eas][!] {file} 类似于 ":w file" 和 ":e #",但不会再次载入,也避免了其它的副作 用。 :saveas :silent[!] {cmd} 安静的执行命令。也不使用消息之后可能的延迟,也不使用 'showmatch'。 RISCOS: 删除了 "!~cmd" 不产生输出也不等待之后的 <Enter> 的效 果。现在可以用 ":silent !cmd"。 :menu <silent> 加入不回显 Ex 命令的菜单。 :map <silent> 加入不回显 Ex 命令的映射。 :checktime 检查缓冲区的改变。 :verbose {cmd} 为单个命令设置 'verbose'。 :echomsg {expr} :echoerr {expr} 类似于 ":echo",但在历史里保存消息。(Mark Waggoner) :grepadd 类似于 ":grep",但加到当前的错误列表,而不是定义新的列表。 :grepadd :finish 结束文件的执行。可以用来跳过 Vim 脚本的其余部分。 :finish :leftabove :aboveleft 在当前窗口的左侧/上方分割窗口。 :rightbelow :belowright 在当前窗口的右侧/下方分割窗口。 :first、:bfirst、:ptfirst 等 ":rewind" 的别名。和 ":last" 相较,更加合乎逻辑。 :enew 编辑新的无名缓冲区。这有必要,因为 ":edit" 重新编辑同一文件。 (Wall) :quitall 同 ":qall"。 :match 定义局部于窗口的匹配高亮。可以为当前窗口高亮项目,而不会影响语 法高亮。 :menu enable :menu disable 打开/关闭菜单项的命令,而不用删除它们。(Monish Shah) :windo 在所有窗口里执行命令。 :bufdo 在所有缓冲区里执行命令。 :wincmd 窗口 (CTRL-W) 命令。可用于不能使用普通模式命令的场合 (比如, CursorHold 自动命令里)。 CursorHold-example 给出一个很好的应 用实例。 :lcd 和 :lchdir 设置窗口的本地目录。(Benjie Chen) :hide {command} 以置位的 'hidden' 执行 {command}。 :emenu 在可视模式里,执行 ":vmenu" 项目。 :popup 弹出弹出式菜单。 :redraw 即使忙于执行脚本或函数时,也刷新屏幕。 :hardcopy 打印到纸张。 :compiler 载入 Vim 脚本,以处理特定编译器的设定。 :z# 列出编号的行。(Bohdan Vlasyuk) 新的位置标记: '( 和 ') 当前句子的开始或结束。用于 Ex 命令。 '{ 和 '} 当前段落的开始或结束。用于 Ex 命令。 '. 当前缓冲区的最近改变位置。 '^ 插入模式停止的位置。 viminfo 文件保存 ^ 和 . 位置标记。可以用来跳转到最近的插入位置或改变文本上。 新函数: argidx() 参数列表的当前索引。 buflisted() 检查缓冲区是否存在并置位了 'buflisted'。 cindent() 得到 'cindent' 的缩进。 eventhandler() 如果在事件处理程序而不能使用交互命令的时候返回 1。 executable() 检查是否程序或批处理脚本可执行。 filewritable() 检查文件是否可写。(Ron Aaron) foldclosed() 检查是否有关闭折叠。(Johannes Zellner)。 foldclosedend() 发现关闭折叠的结尾。 foldlevel() 发现折叠级别。(Johannes Zellner) foreground() 把 GUI 窗口移到前台。 getchar() 让用户输入一个字符。可以用来定义接受一个参数的映射。 getcharmod() 得到最近使用的键修饰符。 getbufvar() 得到缓冲区里选项或局部变量的值 (Ron Aaron) getfsize() 返回文件大小。 getwinvar() 得到窗口里选项或局部变量的值 (Ron Aaron) globpath() 发现目录列表里匹配的文件 hasmapto() 检测是否到字符串的映射已经存在。 iconv() 把字符串从一个编码转换为另一个编码。 indent() 得到行的缩进 (Ron Aaron) inputdialog() 类似于 input(),但在可能的情况下,使用 GUI 对话框。目前支持 Win32、Motif、Athena 和 GTK。 Edit/Settings/Text Width 菜单使用 inputdialog()。 Help/Find.. 和 Toolbar FindHelp 项目也是。 (Win32 支持由 Thore B. Karlsen 提供) (Win16 支持由 Vince Negri 提供) inputsecret() 要求用户输入字符串,但不回显输入的键。(Charles Campbell) libcall() 用于 Unix (Neil Bird,Johannes Zellner,Stephen Wall) libcallnr() 用于 Win32 和 Unix lispindent() 得到 'lisp' 的缩进。 mode() 返回指示当前模式的字符串。 nextnonblank() 跳过正向的空行。 prevnonblank() 跳过反向的空行。可用于缩进脚本。 resolve() MS-Windows: 解析快捷方式为它指向的文件。 Unix: 解析符号链接。 search() 搜索模式。 searchpair() 搜索匹配的组对。可用于缩进文件,以找到匹配 endif 的 "if"。 setbufvar() 设置缓冲区的选项或局部变量。(Ron Aaron) setwinvar() 设置窗口的选项或局部变量。(Ron Aaron) stridx() 搜索一个字符串在另一个字符串里的第一次出现。 strridx() 搜索一个字符串在另一个字符串里的最后一次出现。 tolower() 把字符串转换为全部小写。 toupper() 把字符串转换为全部大写。 type() 检查表达式的类型。 wincol() 光标的窗口列 winwidth() 窗口宽度。(Johannes Zellner) winline() 光标的窗口行 加入了变量和函数命令的花括号扩展。可以用于包含选项值的变量名。也可以用来提供原 始的数组。(Vince Negri) 新的自动命令事件: BufWinEnter 缓冲区在窗口显示时激活。在使用模式行之后。可用于载入视图。 BufWinLeave 缓冲区不再出现于窗口时激活。也在退出 Vim 时激活。可用于保存视 图。 FileChangedRO 在第一次修改只读文件之前激活。可用于文件的刷新。(Scott Graham) TermResponse 在终端应答版本请求时激活。v:termresponse 内部变量保存该值。可 用于对终端版本进行处理。(Ronald Schild) FileReadCmd 在读入文件前激活。 BufReadCmd 在读入文件到缓冲区前激活。 FileWriteCmd 在写回文件前激活。 BufWriteCmd 在写回缓冲区到文件前激活。 FileAppendCmd 在附加到文件前激活。 FuncUndefined 在用户函数没有定义时激活。(Ron Aaron) *Cmd 事件的自动命令进行文件读写,以取代普通的文件读写。netrw.vim 利用这一点来 编辑远程系统上的文件。(Charles Campbell) 新的语法文件: bdf BDF 字体定义 (Nikolai Weibull) catalog SGML 目录 (Johannes Zellner) debchangelog Debian Changelog (Wichert Akkerman) debcontrol Debian 控制 (Wichert Akkerman) dot dot (Markus Mottl) dsl DSSSL 语法 (Johannes Zellner) eterm Eterm 配置 (Nikolai Weibull) indent 缩进概要文件 (profile) (Nikolai Weibull) lftp LFTP (Nikolai Weibull) lynx Lynx 配置 (Doug Kearns) mush mush 源代码 (Bek Oberin) natural Natural (Marko Leipert) pilrc Pal 资源编译器 (Brian Schau) plm PL/M (Philippe Coulonges) povini Povray 配置 (David Necas) ratpoison Ratpoison 配置/命令 (Doug Kearns) readline readline 配置 (Nikolai Weibull) screen Screen RC (Nikolai Weibull) specman Specman (Or Freund) sqlforms SQL*Forms (Austin Ziegler) terminfo terminfo (Nikolai Weibull) tidy Tidy 配置 (Doug Kearns) wget Wget 配置 (Doug Kearns) 更新了许多语法文件,使得在 Vim 5.7 和 6.0 里都能工作。 Ruby 接口。(Shugo Maeda) 支持 MS-Windows 上的 Ruby 接口的动态载入。(Muraoka Taro) Mingw 也支持。(Benoit Cerrina) Win32: 加入动态载入 TCL 的可能性。(Muraoka Taro) 也适用于 Borland 5.5。(Dan Sharp) Win32: 编辑快捷方式的文件 (*.lnk 文件) 时,编辑它指向的文件。除非置位了 'binary',此时编辑快捷方式文件自身。(Yasuhiro Matsumoto) ":command" 命令现在接受 "-bar" 参数。使得用户命令可以被 "| command" 跟随。 现在,预览窗口也被以下命令使用: - :pedit 在预览窗口编辑指定文件 - :psearch 类似于 :ijump ,在头文件里搜索单词,并在预览窗口显示找到的文本。 加入 CTRL-W P 命令: 转到预览窗口。 MS-DOS 和 MS-Windows 也读入系统范围的 vimrc 文件 $VIM/vimrc。多用于多用户的 NT 系统。 鼠标在字符上双击时,如果该字符有 "%" 匹配,选择从该字符到对应匹配的文本。类似 于 "v%"。 "-S session.vim" 参数: 启动时执行脚本。便于 Vim 启动时载入会话文件。 加入 "--cmd {command}" Vim 参数,在 vimrc 文件载入之前执行命令。(Vince Negri) 加入 "-M" Vim 参数: 复位 'modifiable''write',从而禁止对文件修改和写回。 加入 runtime/delmenu.vim。执行之可以删除所有菜单并为载入新菜单做好准备。可用于 修改 'langmenu'。 Perl 脚本,用来过滤 Perl 错误信息并转化为快速修复可用的格式。(Joerg Ziefle) 加入 runtime/macros/less.vim: 模拟 less 的 Vim 脚本,但提供语法高亮。 MS-Windows 安装程序: (Jon Merz) - Win32 程序现在可以在桌面上建立快捷方式,并在开始菜单安装 Vim。 - 可以删除旧的 "Edit with Vim" 项目。 - Vim 可执行文件无须移动或者改变 $PATH。在 $PATH 里建立了一个小的批处理文件。 减少了要作出的选择。 - 检测已经安装的 Vim 的版本,并提供先卸载它们的选择。 改进的 MS-Windows 卸载程序。现在,它同时删除开始菜单的项目,桌面的图标和建立的 批处理文件。(Jon Merz) 也可以只删除其中的一部分。同时撤销 gvim 的 OLE 注册。 生成 MS-Windows 上自安装的 Vim 包。用的是 NSIS。(Jon Merz 等人) 加入 ":filetype detect"。尝试再次检测文件类型。有助于 (比如说) 加入 "#!/bin/csh" 以后,编写的新外壳脚本。 加入 ":augroup! name" 命令,删除自动命令组。客户-服务器 "--remote-wait" 需要。 viminfo 文件里加入 Vim 的版本号,有助于调试。

改 进 improvements-6

'cpoptions' 加入 'n' 标志位: 如果省略,回绕行的文本不放在 'number' 选项显示的 行号中间。这样阅读回绕行容易多了。 如果标签文件有格式错误,报告其字节位置以定位错误。 "gf" 可用于可视模式: 使用选择文本作为文件名。(Chase Tingley) 允许有二义性的映射。这样可以同时映射 "aa" 和 "aaa",使用最长的匹配。这对 ":lmap" 和 'keymap' 特别有用。 加密: 第一次加密时要求加密键输入两次。否则一旦输错,文本就永久丢失了。(Chase Tingley) 现在窗口标题在最后加上了 "VIM"。文件名在前面,这样任务栏上能够看清楚。如果文件 修改过,加 "+",如果文件只读,加 "="。如果文件 'modifiable' 关闭,加 "-"。 可视模式里,在 'showcmd' 的位置提及选择区域的大小。 加入 "b:changedtick" 变量。每次改变都递增,包括撤销。用于在缓冲区有改变时采取 行动。 ":s" 命令的替代字符串中,用 "\=" 可以替代为表达式的运算结果。该表达式内部可用 submatch() 函数访问子匹配。 如果执行 ":qall" 且其它窗口里正在编辑的缓冲区有修改,跳转到那个窗口,而不是编 辑当前窗口的缓冲区。 文件读/写命令加入 "++enc=" 和 "++ff=" 参数,强制使用给定的 'encoding''fileformat'。同时加入 "v:cmdarg" 变量,用于 FileReadCmd 这些自己读写文件的自 动命令。 读入标准输入时,先用二进制模式读入文本,然后再用基于 'fileformat''fileencoding' 的自动选择重新读入。这样避免了重新开始文件 (例如,如果在靠近文 件末的行以 LF 而不是 CR-LF 结束的话)。 如果从标准输入读取文本而缓冲区为空,不标记它为已改变。退出时省得麻烦。 给许多错误信息加入 ID,方便寻找消息的帮助。 插入模式: - 用 "CTRL-G j" 和 "CTRL-G k" 可以在另一行的相同列插入。可用于编辑表格。 - 加入同义词补全,CTRL-X CTRL-T。(Vince Negri) - 加入 'thesaurus' 选项,在同义词补全里代替 'dictionary''complete' 加入 's' 标志位。 - 插入模式的 CTRL-X CTRL-L 使用 'complete' 选项。也在其它载入的缓冲区里扫描匹 配行。 - 插入模式用 CTRL-XCTRL-N 补全时也可用 CTRL-R。(Neil Bird) - 插入模式补全时,如果补全结束,检查来自 'cinkeys''indentkeys' 的单词匹 配。 性能: - 使得显示更新更有效率。所有改变都可能会使用插入/删除行,包括撤销/重做。 - 如果插入模式下有预输入,不刷新显示。大大加快了 CTRL-R。 - 为 32 位 DOS 版本改进了屏幕的输出速度。(Vince Negri) - 鼠标拖动时,往前看鼠标代码,如果下面还有一个,跳过之前的鼠标键。这使得鼠标拖 动快很多。 - 另一个内存用量的改进: 如果调用 u_save 时只有一行且该行最近已经为相同的撤销保 存过,不再保存。 - 使用一次附加一个字符的脚本时,过去分配的内存慢慢增加。'undolevels' 为 -1 也 是如此。因为 "U" 保存的行从来不释放。现在撤销块为空时就释放内存。 - GUI 和 Dos32: 使用垂直滚动区域,使得垂直分割的窗口滚动更快。不需要重画整个窗 口。 - 如果终端代码不支持滚动 (例如,用于垂直分割的窗口),从 ScreenLines[] 重画。应 该比通过 win_line() 的行更快,使用语法高亮时尤其如此。 - 用单独的脚本预先生成 Syntax 菜单。使得菜单的载入加快了 70%,也使 gvim 的启动 时间减半。 - 执行 ":help tag" 时,不先打开 help.txt,直接跳转到要帮助的标签上。更快也避免 额外的信息。 - Win32: 如果文件名不以 ".lnk" 结尾,不试图解析快捷方式。那需要不少时间。 - 如果有预输入的字符,不更新鼠标指针形状。 - META[] 从字符串改为数组,避免使用 strchr()。 - 加入字符时不清除命令行,避免调用 screen_fill 而不做任何事。 健壮性: - Unix: 执行正则表达式时检查堆栈是否溢出。避免很麻烦的溢出。只用于支持能在另一 个堆栈上运行 signal 函数的系统。 - 不允许 ":source <dirname>"。Unix 上可以读取目录,但用它作为 Vim 命令没有任何 意义。 安全: - 从临时文件读或写时,检查它不是符号链接。提供一些针对符号链接攻击的保护。 - 建立备份文件或交换文件时,检查是否已经存在以避免符号链接攻击。(Colin Phipps) - 在沙盘 sandbox 里计算表达式选项。如果用模式行设置选项,它不能造成破坏。 - 使用安全的方式生成临时文件名: 建立一个私人目录用于临时文件。可用于 Unix、 MS-DOS 和 OS/2。 - 'makeef' 可为空,意味着使用内部生成的文件名。旧的缺省值是 "/tmp/file",造成 了安全风险。 在当前目录写入 'makeef' 会在只读目录失败,因而导致在所有文件上 ":grep" 会有 问题。所有系统上的缺省都为空,以便使用临时文件。 - 标签文件的命令在沙盘里执行,以提供更好的安全性。 - 不能在沙盘里使用 Ruby、Tcl 和 Python 接口。它们可能执行危险的任务。Perl 可 以,但只限于安全环境。(Donnie Smith) 语法高亮: - 通过缓存整个文件的状态栈而不只是显示的部分优化速度。折叠需要如此。 - 加入 ":syntax sync fromstart": 总是从文件开始处进行分析。 - 为语法项目加入 "display" 参数: 只在显示结果时使用该项目。使得不用显示的文本 的分析加快。 - 用 CTRL-L 时,删除缓存的状态以强制再次分析文本。 - 关键字表的存储使用 elfhash 算法。应该会产生更好的分布并加快关键字的查找。 (Campbell) - "lc" 引导上下文也可用于跳过和结束模式。(Scott Bigham) - 语法项目可用 "extend" 参数来撤销它所在的项目的 "keepend" 参数的效果。它可以 用来使一些包含的项目扩展一个区域,而另一些不能。 - ":syntax clear" 现在删除 b:current_syntax 变量。这合乎逻辑,因为此命令之后就 没有定义任何语法了。 - 加入 ":syntax enable": 打开语法高亮而不改变颜色。可以在 .vimrc 文件里指定颜 色,而不需要 mysyntaxfile。 - 加入 ":syntax reset": 复位色彩为其缺省值。 - 加入 "contains=TOP" 和 "contains=CONTAINED" 参数,可以定义不包含自身的透明项 目。 - 给语法项目加入 "containedin" 参数。允许加入 contained 项目到已有的项目里 (例 如,要高亮注释里的一个名字)。 无模式选择: - 在命令行窗口里,为其它窗口使用无模式选择。这样可以复制可视文本到命令行窗口。 - 支持终端的命令行的无模式选择,以前只能用于 GUI。 - 无模式选择里双击右键选择整个单词。单击右键不使用双击左键开始的单词选择。使之 和可视模式。 - 无模式选择不再隐含自动复制到剪贴板。现在它取决于 'guioptions' 的 'a' 和 'A' 标志位或者 'clipboard' 的 "autoselect" 和 "autoselectml"。 - 命令行模式加入 CTRL-Y 命令,复制无模式选择内容到剪贴板。也可用于 hit-enter 提示和 more 提示。 删除 runtime/mswin.vim 中命令行模式里 CTRL-YCTRL-Z 的映射,以便使用新的 CTRL-Y 方式。 减少了 regmatch() 使用的堆栈空间的用量,可以在更长的文本上处理复杂的模式。 'isfname' 现在包含 '%' 和 '#'。使得 "vim dir\#file" 可用于 MS-DOS。 加入数字键盘的特殊键 <kEnter><k0> - <k9>,如果没有映射,和 ASCII 等价字符完 全相同。(Ivan Wellesz 和 Vince Negri) 识别更多的一些 xterm 键: <C-Right><C-Left><C-End><C-Home> Vim 将要退出时同时激活 BufUnload 事件。可能脚本需要进行一些处理。 扩展反引号里的表达式: ={expr} 。任何进行反引号扩展的地方都可用。(Vince Negri) GUI: - 'guioptions' 加入 'L' 和 'R' 标志位: 只有在垂直分割窗口存在时才加入左或右滚 动条。 - X11: 如果一个颜色不能分配,使用最接近的 colormap 的匹配。否则太多东西会使用 黑色。(Monish Shah) 也用于菜单和滚动条,否则它们都变成黑色了。 - Win32 和 X11: 加入 'mouseshape' 选项: 根据当前模式调整鼠标指针形状。 (Vince Negri) - 加入 'linespace' 选项: 行间插入像素行。(Nam) - 允许按住 CTRL 和 SHIFT 来进入无模式选择 (不用移动光标)。(Ivan Wellesz) - Motif: 加入工具栏。(Gordon Prieur) 也加入工具提示。 - Athena: 加入工具栏和工具提示。(David Harrison -- 基于 Gordon Prieur 的工 作) - 'toolbar' 选项可用于 Athena 和 Motif。现在可以在线切换文本和图标。 (David Harrison) - 支持 Athena 的菜单分隔行。(David Harrison) - Athena: 调整下拉菜单里的箭头位图,使之和字体的大小相同。(David Harrison) - Win32: 'guifont' 加入 "c" 标志位以指定字符集。(Artem Khodush) - 如果没有给出 --enable-xim 参数,使用 X GUI 时自动打开它。需要它来提供死键支 持 (和多字节支持)。 - 文件选择对话框之后,检查编辑文件没有被改变或删除。Win32 对话框允许删除和换名 文件。 - Motif 和 Athena: 加入 "editres" 的支持。(Marcin Dalecki) - Motif 和 Athena: 加入 "menuFont",指定菜单的字体或字体集。也可以用 "Menu" 高 亮组设置。用于 locale 和 'encoding' 不同的场合。(David Harrison) 如果定义了 FONTSET_ALWAYS,菜单总是使用字体集。避免从字体切换到字体集时出现 的问题。(David Harrison) - 工具提示的高亮和字体可以用 "Tooltip" 高亮组指定。(David Harrison) - more 提示里可用命令行模式菜单。这基本上都能工作,因为它们以 CTRL-C 启动。 "Copy" 菜单可用于复制无模式的选择。允许不用自动选择而复制 ":set all" 或 ":intro" 的输出。 - 启动 GUI 时如果标准输出和标准错误没有连接到终端,在对话框里显示错误信息。过 去彻底不显示。 - 允许设置 'browsedir' 为目录名,用于文件对话框。(Dan Sharp) - 可以设置 b:browsefilter 和 g:browsefilter 为文件对话框使用的过滤。Win32 和 Motif GUI 支持。(Dan Sharp) X11: - 支持剪贴板的选择区作为寄存器 "+。退出或者暂停时,复制选择区到剪切缓冲区 0。 这样可以用 X11 的标准方式复制/粘贴到许多应用程序。(Neil Bird) - 在任何终端上使用 X 剪贴板,不只是 xterm。 'clipboard' 加入 "exclude:": 指定模式,匹配的终端名不建立到 X 服务器的连接。 缺省值目前可用于 FreeBSD 和 Linux 控制台。 - 如果 'verbose' 非零,加入一些消息显示连接到 X 服务器时发生了什么。如果要研究 为什么启动很慢,应该有帮助。 GTK GUI: (部分由 Marcin Dalecki 提供) - 一些字体的字符可能比 ascent + descent 还要高,例如 "-misc-fixed-*-*-*-*-18-*-*-*-*-*-iso10646-1"。给字符单元高度加一。 - 实现 'winaltkeys' 的 "no" 值: 如果建立菜单后改变了 'wak',不使用 Alt 键作为 菜单快捷键。 - GUI 启动后可以设置 'wak'。 - 回收文本 GC 以减少通信。 - 调整窗口管理器的图标大小。 - 字体处理进行了清理。 - XQueryColor 被 GDK 调用替换。 - Gnome 支持。configure 里会检测 Gnome 并为此使用不同的窗口组件 (widget)。否则 和 GTK 基本类似。(Andy Kahn) 缺省关闭,因为会造成一些问题。 - 删除先分叉 (fork) 然后启动 GUI 用的特殊代码。现在用 _exit() 代替 exit(),这 不需要任何特殊技巧。 - 对话框有时出现的位置远了些。现在把对话框定位在 gvim 窗口内部。 (Brent Verner) - 放置文件到 Vim 时,删除路径开始处额外的斜杠。如果可能,也缩短文件名。 Motif: (Marcin Dalecki) - 使对话框的布局更好一点。 - 加入搜索和搜索/替代对话框。 - 菜单里把 "iso-8859" 换成 "iso_8859"。Linux 看来需要如此。 - 对话框里加入图标,就像 GTK 那样。 - 如有可能,图标使用 XPM 位图。如果存在,使用 Solaris 的 XpmP.h 头文件。 - 改变工具栏项目的阴影,使得按下时它的可视反馈不那么 Lesstif。 - 为了提高速度,一些项目使用 gadget 而不是 window。 命令行补全: - 补全环境变量名。(Mike Steed) - ":command" 加入一些补全方法: "mapping"、"function"、"expression" 和 "environment"。 - 如果函数不接受参数,补全加上 () 而不是 (。 MS-DOS、MS-Windows 和 OS/2 上: 扩展 %VAR% 环境变量,就像 $VAR 一样。 (Walter Briscoe) 重定向消息到剪贴板 ":redir @*" 和到无名寄存器 ":redir @""。(Wall) ":let @/ = ''" 清除搜索模式,而不是把它设为空字符串。 表达式计算: - 可用 "? :",就像 C 那样。 - col("$") 返回光标行的长度加一。(Stephen P. Wall) - match()、matchend() 和 matchstr() 可选的附加参数: 开始寻找匹配的位移。 - 使 strpart() 第三个参数可选。(Paul Moore,Zdenek Sekera) - exists() 也可用于检查 Ex 命令和自动命令的定义与否。 - input() 加入额外参数: 缺省文本。 - ":silinet! cmd" 同时设置 "v:errmsg"。 - 加入 v:prevcount 变量: 前一个命令的 v:count。 - 加入 "v:progname",Vim 启动时所用的名字。(Vince Negri) - 关于函数返回的 verbose 消息也显示返回值。 Cscope: - 加入 cscope_connection() 函数。(Andy Kahn) - ":cscope kill -1" 杀死所有的 cscope 连接。(Andy Kahn) - 加入 'cscopepathcomp' 选项。(Scott Hauck) - 加入 ":scscope" 命令,分割窗口并执行 Cscope 命令。(Jason Duell) VMS: - 命令行参数总是大写的。"-X" 参数被理解为 "-x" 而 "-/X" 则成为 "-X"。 - 使得 'makeprg''grepprg' 的缺省值有意义。(Zoltan Arpadffy) - 使用 X 剪贴板特性和 X 命令服务器。(Zoltan Arpadffy) Macintosh: (Dany St-Amant) - 允许标签文件使用 CR、CR-LF 或 LF 作为换行符。(Axel Kielhorn) - 代码改用 Carbon 环境 (同时保留非 Carbon 的代码) (一些工作是从 Ammon Skidmore 那里 "偷来的") - 改进了菜单项目索引的处理 (应该更快了) - 运行时命令现在能处理文件名里的 / (MacOS 9 版本) - 加入 ":winpos" 支持。 - 支持在文件里用 "~" 代表主目录。 选项: - 用 set += 或 ^= 时,检查使用两次的项目。删除重复项目。(Vince Negri) - 设置标志位列表的选项时,删除重复的标志位。 - 如果可能,使用 getrlimit() 来设置 'maxmemtot''maxmem'。(Pina) - 'nrformats' 加入 "alpha": 用 CTRL-ACTRL-X 可以递增或递减字母表字符。 - ":set opt&vi" 设置选项为 Vi 缺省值。":set opt&vim" 则设为 Vim 缺省值。可用于 只想设置 'cpo' 为 Vim 缺省值而不想知道其中包含什么标志位的场合。 - 'scrolloff' 现在也适用于长的窗口放不下的回绕行。 - 缺省菜单加入更多选项设置。 - 更新选项窗口以包含新的选项。使它更易阅读。 内部改变: - 把行指针分成文本部分和属性部分。这样将来可以方便修改,属性可以多于一个字节。 - 如果系统没有的话,提供 qsort() 函数。 - 把一个用于普通模式的大的 switch 换成一个表。这使代码清晰很多,也避免了一些编 译器的优化出现的麻烦。 - 赋给特殊键一个负值,避免它们和 Unicode 字符混淆起来。 - 全局变量 expand_context 和 expand_pattern 本来不打算是全局的。把它们传给 ExpandOne() 和所有它调用的函数。 - 不再使用全局的 reg_ic 标志位。它造成了麻烦,而且一些地方它也没有设置。 - 删除用于 "*"、"K"、CTRL-] 等的 stuff 缓冲区的使用。避免自动命令的问题。 - 一些代码从 ex_docmd.c 移到了 ex_cmds2.c。该文件太大了。一些代码也从 screen.c 移到了 move.c。 - 不直接包含加密用的 CRC 表而是生成它。这样减少了不少源代码的空间。 (Matthias Kramm) - multibyte.c 换名为 mbyte.c,避免 8.3 文件系统的问题。 - 删除 ":findhelp" 的 GTK 实现,现在使用 ToolBar.FindHelp 菜单项。 - 换名 mch_windexit() 为 mch_exit(),mch_init() 为 mch_early_init(),还有 mch_shellinit() 为 mch_init()。 高亮: - ":highlight" 列表中,用高亮自己的颜色显示 "xxx"。 - 加入 xterm 88 色或 256 色的支持。正确的高亮数目被用作 ":highlight" 命令的名 字。(Steve Wall) - ":highlight" 加入 "default" 参数。如果包含且该高亮组已经定义,忽略此命令。 所有的语法文件现在使用 ":hi default ...",这样用户可以在自己的 vimrc 文件里 指定颜色。另外,不再需要 "if did_xxx_syntax_inits"。这大大简化了为特定语言使 用非缺省颜色的工作。 - 调整了 colortest.vim: 包含正常背景的颜色,还有用 while 循环减少了代码。 (Rafael Garcia-Suarez) - 加入 "DarkYellow" 颜色名,使标准颜色的清单更一致。虽然它本身并不那么好看。 如果 xterm 处于 8 位模式,用 t_RV 返回的编码来检测这种情况。所有的键码都被自 动转换为它们的 8 位版本。 用 xterm patch level 141 和之后版本的 OPT_TCAP_QUERY 获得实际使用的键码和 t_Co 中颜色的编码。只有同时使用 t_RV 时才会如此。 ":browse set" 现在也可用于控制台模式。":browse edit" 则会给出错误信息。 ":bdelete" 和 ":bunload" 只报告多于 'report' 的删除/卸载缓冲区数目。如果在脚本 里删除缓冲区,这个消息的出现会相当讨厌。 跳转表: - 跳转表保存的位置标记的数目从 50 个增加到 100 个。 - viminfo 文件现在保存跳转表。CTRL-O 可以用来跳转到前一个编辑会话的位置。 - 执行 ":split" 时把跳转表复制到新窗口里。 "~" 和 "r" 命令同时设置 '[ 和 '] 位置标记。现在用普通模式命令进行改变时,总是 设置这些位置标记。 Python 接口: 允许设置垂直分割窗口的宽度。(John Cook) 'cinkeys' 加入 "=word" 和 "=~word" (也用于 'indentkeys')。 'cinoptions' 加入 "j1" 参数: 缩进 Java () 里的 {}。(Johannes Zellner) 'cinoptions' 加入 "l" 标志位。(Anduin Withers) 'cinoptions' 加入 'C'、'U'、'w' 和 'm' 标志位。(Servatius Brandt) 执行 ":wall" 或 ":wqall" 而修改过的缓冲区没有名字时,在错误信息里提到缓冲区的 编号。 ":function Name" 列出函数和行号。容易发现错误在何处。 非面向列块的可视模式里,"r" 替换所有选择的字符为输入的单个字符,和面向列块的可 视模式相同。 用任何方式编辑参数列表中的最后一个文件就允许退出。以前用 ":next" 或 ":last" 访 问该文件才可以。 'formatoptions' 加入 '1' 标志位。(Vit Stradal) 'formatoptions' 加入 'n' 标志位: 排版编号列表。 交换文件: - 如果交换文件已经存在并且用户在 ATTENTION 提示时选择了 "Delete",使用相同的 ".swp" 交换文件以避免建立 ".swo" 文件,后者不一定总能找到。 - 如果给出 ATTENTION 消息并且文件的日期比交换文件的日期更新,给出警告。 - 简化关于已有的交换文件的消息,使之能在 24 行的屏幕上显示。 - 原来可以建立和交换文件同名且到不存在的文件的符号链接。Vim 这时会安静的使用另 一个文件 (如果用 O_EXCL 打开文件时拒绝符号链接的话) 现在检查符号链接是否指向 存在的文件。也在建立之前检查交换文件是否已经存在以发现符号链接攻击。 g CTRL-G 命令也可用于可视模式并计算单词的个数。(Chase Tingley) 如果使用 'shell' 但为空,报错。 加入 'shellpipe' 包含 "%s" 的可能性。 'display' 加入 "uhex" 值: 用 <xx> 形式显示不可显示字符。不可显示字符使用 NonText 高亮,命令行上也是如此。 要求显示隐藏选项的值时,说明不支持这么做。 Win32: - 把快捷方式放置在 gvim (.lnk file) 之上会编辑目标文件,而不是快捷方式本身。 (Yasuhiro Matsumoto) - 加入 C 版本的 OpenWithVim 和 SendToVim 程序。(Walter Briscoe) - 如果 'shell' 是 "cmd" 或 "cmd.exe",设置 'shellredir' 使之同时重定向标准错误 (stderr)。也检查 Unix 的外壳名。 - 如果定义 $HOMEDRIVE 和 $HOMEPATH,用它们来定义 $HOME。(Craig Barkhouse) Win32 控制台版本: - ":version" 消息,如有可能,包含用户名和系统名。为此,生成 pathdef.c 文件。 (Jon Miner) - 设置窗口图标为 Vim 的图标 (只用于 Windows 2000)。执行外壳命令时,修改窗口标 题以显示这一点。退出时也恢复光标位置。(Craig Barkhouse) - Win32 控制台版本可以在编译时加入 OLE 支持,但只会作为客户端而非 OLE 服务器。 错误格式: - 'errorformat' 的 "%p" (一列字符指示的错误列) 也能接受一行句号。 - 'errorformat' 加入 "%v" 项目: 虚拟列号。(Dan Sharp) - 'errorformat' 加入 VMS 的缺省值。(Jim Bush) "p" 命令现在可用于可视模式。它用寄存器的内容覆盖选择文本。 介绍消息里高亮 <> 项目,明确它们是特殊的。 使用 ":substitute" 的 "c" 标志位时,允许输入 "l" 来替换项目并停止: l 代表 "last (最后)"。 执行其它文件时显示 verbose 消息时,显示行号。 改变 Vim 窗口大小时,不使用 'equalalways'。避免 Vim 窗口变小时分割窗口变大。文 档是这么说的。 插入模式输入 CTRL-D 时,如果刚在自动缩进之后,输入 CR 过去保持余下的空白。现在 和 BS 类似: 删除自动缩进,避免产生空白 (但非空) 的行。 OLE 接口加入 GetHwnd() 调用。(Vince Negri) 使得 ":normal" 可用于事件处理程序。用于把文件放置到 Vim 中和 CursorHold 自动命 令。 MS-Windows 版本上,如果使用斜杠而不是反斜杠,不改变到文件的目录。探索器总是用 反斜杠,而用户可以在输入命令时使用斜杠。 修改时间 (时间戳): - 如果缓冲区在 Vim 的外部被改变并重新获得焦点,给出对话框,用于用户重新载入文 件。现在也适用于 MS-Windows 之外的其它 GUI,还有编译时加入对话框支持的控制 台。 - 检查文件内容以发现它是否真的改变了,忽略只有时间戳本身被修改的情况 (例如,从 CVS check out 文件)。 - 检查时间戳时,先检查文件大小是否改变,如果是就不用进行文件比较了。不断附加的 大 (日志) 文件会快很多。 - 如果设置 'buftype',不给出改变或删除文件的警告。 - 不再警告目录的改变,否则文件探索器会产生警告。 - 只对不隐藏的缓冲区检查时间戳。否则,等它们不隐藏时才检查。 - 检查文件是否在 Vim 之外改变时,同时检查文件权限是否改变。如果文件内容不改变 但权限改变了,给出警告。 - 避免过于频繁的检查,不然对于不断增长的文件,对话框会不断弹出来。 如果 'encoding' 为 "latin1" 映射 <M-A> 然后把 'encoding' 改为 "utf-8" 会使得多 字节的第一个字节被映射。这个问题很难发现。现在禁止映射多字节字符的一部分。 ":python" 和 ":tcl" 接受内含脚本。(Johannes Zellner) 也适用于 ":ruby" 和 ":perl"。(Benoit Cerrina) 如果文件名不是完整路径,":syn include" 使用 'runtimepath'。 如果 'switchbuf' 包含 "split" 而当前窗口为空,不分割窗口。 Unix: 捕获 SIGPWR,电源将要关闭时保存文件。 Sniff 接口: (Anton Leherbauer) - 修正窗口代码,尤其是事件处理部分 - 更新到 sniff 4.x ($SNIFF_DIR4) - 支持运行时加入 sniff 请求 支持 <A-x> 记法,作为 <M-x> 的别名。这合乎逻辑,因为使用了 Alt 键。 ":find" 接受计数,意味着使用 'path' 的第 count 个匹配。 ":ls" 和 ":buffers" 输出显示 modified/readonly/modifiable 标志位。如果缓冲区激 活,显示 "a" 而不是什么都不显示。如果缓冲区未载入,什么都不显示而不是 "-"。 Unix 安装: - 安装 tools 时,使用 tools 脚本 efm_perl.pl 和 mve.awk 的绝对路径。这样用户就 不用编辑这些文件。 - KDE 在目录存在但图标还不存在时安装图标。 加入 has("win95"),在 Vim 脚本里用于区别 MS-Windows 95/98/ME 和 NT/2000/XP。 输入 ":cd" 命令时,回显新的当前目录。(Dan Sharp) 如果在 GUI 窗口打开前使用 ":winpos",先记住其值,打开后才使用。 ":version" 的输出里,加入 "/dyn" 代表特性能动态载入。这也同时意味着该特性不一 定总能用。 Windows NT 上目录可以只读但允许删除文件。用换名文件建立备份而 'backupdir' 不用 当前目录时,原先的文件被被删除,但新文件却不能建立。现在给出额外的错误信息,警 告用户这一情况。 命令行上的 CTRL-R CTRL-OCTRL-R CTRL-R 类似,和插入模式的行为一致。

编 译 时 的 改 变 compile-changes-6

所有生成的文件现在从 "src" 目录移出。这使得观察哪些文件是或不是手动编辑更为容 易。configure 生成的文件现在放在 "src/auto" 目录。Unix 上,经过编译的目标文件 放在 objects 目录里。 源代码的归档已经超过了 1.4M 软盘的大小。现在把归档分割为两个运行时归档和两个源 代码归档。另外提供 bzip2 压缩归档,它包含所有的源程序和运行时文件。 make 增加了 "reconfig" 目标。在修改某些需要刷新缓存的参数时有用。比如从 GTK 到 Motif 的切换。调整 GUI_INC_LOC 和 GUI_LIB_LOC 的含义,使得不同 GUI 之间能够 一致。 加入 src/README.txt,提供源代码主要部分的总览。 Unix 的 Makefile 现在完全支持使用 $(DESTDIR) 来安装到特定的位置。替换手动的 *ENDLOC 变量设置。 configure 加入 --with-compiledby 参数,提供二进制版本的维护者加入 e-mail 地址 的可能性。 包含的特性现在使用如下的特性包 "tiny"、"small"、"normal"、"big" 和 "huge"。这 替代了以前的 "min-features" 和 "max-features"。要得到一个真的很小的 Vim,可以 使用 "tiny",它关闭了多重窗口。 使用 tiny 版本或者如果没有定义 FEAT_WINDOWS: Firstwin 和 lastwin 等于 curwin, 而且不使用 w_next 和 w_prev。 加入 +listcmds 特性。可以用来使得编译时没有操作缓冲区列表和参数列表的 Vim 命令 (缓冲区列表自己还是在的,不能没有它)。 加入 +vreplace 特性。在 "small" 版本里,它被关闭,以免 16 位的 DOS 版本内存占 用过多。 删除了 1.6.16 版本之前的 GTK+ 支持。 configure 对是否可以使用 PTY 的检查有了改进。代码来自 screen 的新近版本。 configure 加入安装 Vim、Ex 和 View 为其它名字的选项 (比如,vim6、ex6 和 view6)。 configure 加入 "--with-global-runtime" 参数。可以指定 'runtimepath' 使用的缺省 全局目录。 可以用 configure 参数打开 SNiFF+ 接口。 configure 现在总是在 /usr/local/lib 里检查库,还有在 /usr/local/include 里检查 头文件。这有助于找到 iconv() 和 gettext()。 把命令行历史的代码移到 +cmdline_hist 特性里,以从 tiny 版本里去掉命令行历史。 MS-Windows: Win16 和 Win32 公用的函数移到了 os_mswin.c。避免为同一问题修改两个 文件。(Vince Negri) 把 gui_w16.c 和 gui_w32.c 的公共代码移到 gui_w48.c (Vince Negri) 现在,跳转表是一个单独的特性。"small" 版本关闭此特性 (16 位 MS-DOS)。 所有 _t 结尾的类型换名为 _T 结尾。避免潜在的和系统类型冲突的问题。 configure 加入隐含定义返回类型为 int 的 X11 头文件的检查。(Steve Wall) 顶层目录的 "make doslang" 建立 Windows 的菜单和 .mo 文件的归档。它使用 Unix 上 产生的文件,这些文件应该在 MS-Windows 上也能用。 os_vms.c 和 os_unix.c 有很大一部分进行了合并。过去,重复的代码使得维护需要更多 工作。(Zoltan Arpadffy) Borland C 版本 5 Makefile 的改进: (Dan Sharp) - 修正 Perl 支持 - 加入 python 和 tcl 支持 - 加入动态的 perl 和动态的 python 支持 - 加入 uninstal.exe 支持 - 选项使用 "yes" 和 "no",类似于 Make_mvc.mak。 Win32: 合并 Make_gvc.mak 和 Make_ovc.mak 为一个文件: Make_ivc.mak。它更小,许 多不必要的文本被删除了。(Walter Briscoe) 增加 Make_dvc.mak,允许调试 MS-Devstudio 的 Make_mvc.mak 生成的 exe。 (Walter Briscoe) MS-Windows: big 版本的 gvim.exe,包括 OLE,现在也包含了动态载入的 Tcl、Perl 和 Python。它使用 ActivePerl 5.6.1、ActivePython 2.1.1 和 ActiveTCL 8.3.3 configure.in 里加入 AC_EXEEXT,在 Cygwin 或 MingW 下检查可执行文件是否需要 ".exe",以便在 Makefile 里把 SUFFIX 换名为 EXEEXT。 Win32: 延迟载入 comdlg32.dll 以加快启动。只用于 VC 6。(Vipin Aravind) Win32: 如果用 Borland 编译,允许使用 IME。(Yasuhiro Matsumoto) Win32: 加入 Borland 5 编译 gvimext.dll 的 Makefile。(Yasuhiro Matsumoto)

漏 洞 修 正 bug-fixes-6

When checking the command name for "gvim", "ex", etc. ignore case. Required for systems where case is ignored in command names. Search pattern "[a-c-e]" also matched a 'd' and didn't match a '-'. When double-clicking in another window, wasn't recognized as double click, because topline is different. Added set_mouse_topline(). The BROKEN_LOCALE check was broken. (Marcin Dalecki) When "t_Co" is set, the default colors remain the same, thus wrong. Reset the colors after changing "t_Co". (Steve Wall) When exiting with ":wqall" the messages about writing files could overwrite each other and be lost forever. When starting Vim with an extremely long file name (around 1024 characters) it would crash. Added a few checks to avoid buffer overflows. CTRL-E could get stuck in a file with very long lines. ":au syntax<Tab>" expanded event names while it should expand groups starting with "syntax". When expanding a file name caused an error (e.g., for <amatch>) it was produced even when inside an "if 0". 'cindent' formatted C comments differently from what the 'comments' option specified. (Steve Wall) Default for 'grepprg' didn't include the file name when only grepping in one file. Now /dev/null has been added for Unix. Opening the option window twice caused trouble. Now the cursor goes to the existing option window. ":sview" and ":view" didn't set 'readonly' for an existing buffer. Now do set 'readonly', unless the buffer is also edited in another window. GTK GUI: When 'guioptions' excluded 'g', the more prompt caused the toolbar and menubar to disappear and resize the window (which clears the text). Now always grey-out the toplevel menus to avoid that the menubar changes size or disappears. When re-using the current buffer for a new buffer, buffer-local variables were not deleted. GUI: when 'scrolloff' is 0 dragging the mouse above the window didn't cause a down scroll. Now pass on a mouse event with mouse_row set to -1. Win32: Console version didn't work on telnet, because of switching between two console screens. Now use one console screen and save/restore the contents when needed. (Craig Barkhouse) When reading a file the magic number for encryption was included in the file length. (Antonio Colombo) The quickfix window contained leading whitespace and NULs for multi-line messages. (David Harrison) When using cscope, redundant tags were removed. This caused a numbering problem, because they were all listed. Don't remove redundant cscope tags. (David Bustos). Cscope: Test for which matches are in the current buffer sometimes failed, causing a jump to another match than selected. (David Bustos) Win32: Buffer overflow when adding a charset name in a font. 'titlestring' and 'iconstring' were evaluating an expression in the current context, which could be a user function, which is a problem for local variables vs global variables. Win32 GUI: Mapping <M-F> didn't work. Now handle SHIFT and CTRL in _OnSysChar(). Win32 GUI: (on no file), :vs<CR>:q<CR> left a trail of pixels down the middle. Could also happen for the ruler. screen_puts() didn't clear the right char in ScreenLines[] for the bold trick. Win32: ":%!sort|uniq" didn't work, because the input file name touches the "|". Insert a space before the "|". OS/2: Expanding wildcards included non-existing files. Caused ":runtime" to fail, which caused syntax highlighting to fail. Pasting a register containing CTRL-R on the command line could cause an endless loop that can't be interrupted. Now it can be stopped with CTRL-C. When 'verbose' is set, a message for file read/write could overwrite the previous message. When 'verbose' is set, the header from ":select" was put after the last message. Now start a new line. The hit-enter prompt reacted to the response of the t_RV string, causing messages at startup to disappear. When t_Co was set to 1, colors were still used. Now only use color when t_Co > 1. Listing functions with ":function" didn't quit when 'q' or ':' was typed at the more prompt. Use mkstemp() instead of mktemp() when it's available, avoids a warning for linking on FreeBSD. When doing Insert mode completion it's possible that b_sfname is NULL. Don't give it to printf() for the "Scanning" message. ":set runtimepath-=$VIMRUNTIME" didn't work, because expansion of wildcards was done after trying to remove the string. Now for ":set opt+=val" and ":set opt-=val" the expansion of wildcards is done before adding or removing "val". Using CTRL-V with the "r" command with a blockwise Visual selection inserted a CTRL-V instead of getting a special character. Unix: Changed the order of libraries: Put -lXdmcp after -lX11 and -lSM -lICE after -lXdmcp. Should fix link problem on HP-UX 10.20. Don't remove the last "-lm" from the link line. Vim may link but fail later when the GUI starts. When the shell returns with an error when trying to expand wildcards, do include the pattern when the "EW_NOTFOUND" flag was set. When expanding wildcards with the shell fails, give a clear error message instead of just "1 returned". Selecting a Visual block, with the start partly on a Tab, deleting it leaves the cursor too far to the left. Causes "s" to work in the wrong position. Pound sign in normal.c caused trouble on some compilers. Use 0xA3 instead. Warning for changing a read-only file wasn't given when 'insertmode' was set. Win32: When 'shellxquote' is set to a double quote (e.g., using csh), ":!start notepad file" doesn't work. Remove the double quotes added by 'shellxquote' when using ":!start". (Pavol Juhas) The "<f-args>" argument of ":command" didn't accept Tabs for white space. Also, don't add an empty argument when there are trailing blanks. ":e test\\je" edited "test\je", but ":next test\\je" edited "testje". Backslashes were removed one time too many for ":next". VMS: "gf" didn't work properly. Use vms_fixfilename() to translate the file name. (Zoltan Arpadffy) After ":hi Normal ctermbg=black ctermfg=white" and suspending Vim not all characters are redrawn with the right background. When doing "make test" without +eval or +windows feature, many tests failed. Now have test1 generate a script to copy the correct output, so that a test that doesn't work is skipped. On FreeBSD the Perl interface added "-lc" to the link command and Python added "-pthread". These two don't work together, because the libc_r library should be used. Removed "-lc" from Perl, it should not be needed. Also: Add "-pthread" to $LIBS, so that the checks for functions is done with libc_r. Sigaltstack() appears to be missing from libc_r. The Syntax sub-menus were getting too long, reorganized them and added another level for some languages. Visual block "r"eplace didn't work well when a Tab is partly included. (Matthias Kramm) When yanking a Visual block, where some lines end halfway the block, putting the text somewhere else doesn't insert a block. Padd with spaces for missing characters. Added "y_width" to struct yankreg. (Matthias Kramm) If a substitute string has a multibyte character after a backslash only the first byte of it was skipped. (Muraoka Taro) Win32: Numeric keypad keys were missing from the builtin termcap entry. When a file was read-only ":wa!" didn't force it to be written. (Vince Negri) Amiga: A file name starting with a colon was considered absolute but it isn't. Amiga: ":pwd" added a slash when in the root of a drive. Don't let 'ttymouse' default to "dec" when compiled with dec mouse support. It breaks the gpm mouse (Linux console). The prototypes for the Perl interface didn't work for threaded Perl. Added a sed command to remove the prototypes from proto/if_perl.pro and added them manually to if_perl.xs. When ":w!" resets the 'readonly' option the title and status lines were not updated. ":args" showed the current file when the argument list was empty. Made this work like Vi: display nothing. "99:<C-U>echo v:count" echoed "99" in Normal mode, but 0 in Visual mode. Don't set v:count when executing a stuffed command. Amiga: Got a requester for "home:" because it's in the default runtime path. Don't bring up a requester when searching for a file in 'path', sourcing the .vimrc file or using ":runtime". Win16 and Win32: Considered a file "\path\file" absolute. Can cause the same file to appear as two different buffers. Win32: Renaming a file to an empty string crashed Vim. Happened when using explorer.vim and hitting ESC at the rename prompt. Win32: strftime() crashed when called with a "-1" value for the time. Win32 with Borland compiler: mch_FullName() didn't work, caused tag file not to be found. Cscope sometimes jumped to the wrong tag. (David Bustos) OS/2: Could not find the tags file. mch_expand_wildcards() added another slash to a directory name. When using ">>" the `] mark was not in the last column. When Vim was compiled without menu support, filetype.vim was still trying to source the menu.vim script. (Rafael Garcia-Suarez) ":ptag" added an item to the tag stack. Win32 IME: "gr" didn't use IME mode. In the "vim --help" message the term "options" was used for arguments. That's confusing, call them "arguments". When there are two windows, and a BufUnload autocommand for closing window #1 closed window #2, Vim would crash. When there is a preview window and only one other window, ":q" wouldn't exit. In Insert mode, when cancelling a digraph with ESC, the '?' wasn't removed. On Unix glob(".*") returned "." and "..", on Windows it didn't. On Windows glob("*") also returned files starting with a dot. Made this work like Unix on all systems. Win32: Removed old code to open a console. Vimrun is now used and works fine. Compute the room needed by the intro message accurately, so that it also fits on a 25 line console. (Craig Barkhouse) ":ptnext" was broken. Now remember the last tag used in the preview window separately from the tagstack. Didn't check for "-display" being the last argument. (Wichert Akkerman) GTK GUI: When starting "gvim" under some conditions there would be an X error. Don't replace the error handler when creating the xterm clipboard. (Wichert Akkerman) Adding a space after a help tag caused the tag not to be found. E.g., ":he autoindent ". Was trying to expand a URL into a full path name. On Windows this resulted in the current directory to be prepended to the URL. Added vim_isAbsName() and vim_FullName() to avoid that various machine specific functions do it differently. ":n *.c" ":cd .." ":n" didn't use the original directory of the file. Vi only does it for the current file (looks like a bug). Now remember the buffer used for the entry in the argument list and use its name (adjusted when doing ":cd"), unless it's deleted. When inserting a special key as its name ("<F8>" as four characters) after moving around in Insert mode, undo didn't work properly. Motif GUI: When using the right mouse button, for some people gvim froze for a couple of seconds (Motif 1.2?). This doesn't happen when there is no Popup menu. Solved by only creating a popup menu when 'mousemodel' is "popup" or "popup_setpos". (David Harrison) Motif: When adding many menu items, the "Help" menu disappeared but the menubar didn't wrap. Now manually set the menubar height. When using <BS> in Insert mode to remove a line break, or using "J" to join lines, the cursor could end up halfway a multibyte character. (Muraoka Taro) Removed defining SVR4 in configure. It causes problems for some X header files and doesn't appear to be used anywhere. When 'wildignore' is used, 'ignorecase' for a tag match was not working. When 'wildignore' contains "*~" it was impossible to edit a file ending in a "~". Now don't recognize a file ending in "~" as containing wildcards. Disabled the mouse code for OS/2. It was not really used. ":mksession" always used the full path name for a buffer, also when the short name could be used. ":mkvimrc" and ":mksession" didn't save 'wildchar' and 'pastetoggle' in such a way that they would be restored. Now use the key name if possible, this is portable. After recovering a file and abandoning it, an ":edit" command didn't give the ATTENTION prompt again. Would be useful to be able to delete the file in an easy way. Reset the BF_RECOVERED flag when unloading the buffer. histdel() could match or ignore case, depending on what happened before it. Now always match case. When a window size was specified when splitting a window, it would still get the size from 'winheight' or 'winwidth' if it's larger. When using "append" or "insert" inside a function definition, a line starting with "function" or "endfunction" caused confusion. Now recognize the commands and skip lines until a ".". At the end of any function or sourced file need_wait_return could be reset, causing messages to disappear when redrawing. When in a while loop the line number for error messages stayed fixed. Now the line number is remembered in the while loop. "cd c:/" didn't work on MS-DOS. mch_isdir() removed a trailing slash. MS-Windows: getftime() didn't work when a directory had a trailing slash or backslash. Didn't show the time in the explorer because of this. When doing wildcard completion, a directory "a/" sorted after "a-b". Now recognize path separators when sorting files. Non-Unix systems: When editing "c:/dir/../file" and "c:/file" they were created as different buffers, although it's the same file. Expand to a full file name also when an absolute name contains "..". "g&" didn't repeat the last substitute properly. When 'clipboard' was set to "unnamed", a "Y" command would not write to "0. Now make a copy of register 0 to the clipboard register. When the search pattern matches in many ways, it could not always be interrupted with a CTRL-C. And CTRL-C would have to be hit once for every line when 'hlsearch' is on. When 'incsearch' is on and interrupting the search for a match, don't abandon the command line. When turning a directory name into a full path, e.g., with fnamemodify(), sometimes a slash was added. Make this consistent: Don't add a slash. When a file name contains a "!", using it in a shell command will cause trouble: ":!cat %". Escape the "!" to avoid that. Escape it another time when 'shell' contains "sh". Completing a file name that has a tail that starts with a "~" didn't work: ":e view/~<Tab>". Using a ":command" argument that contains < and > but not for a special argument was not skipped properly. The DOS install program: On Win2000 the check for a vim.exe or gvim.exe in $PATH didn't work, it always found it in the current directory. Rename the vim.exe in the current dir to avoid this. (Walter Briscoe) In the MS-DOS/Windows install program, use %VIM% instead of an absolute path, so that moving Vim requires only one change in the batch file. Mac: mch_FullName() changed the "fname" argument and didn't always initialize the buffer. MS-DOS: mch_FullName() didn't fix forward/backward slashes in an absolute file name. "echo expand("%:p:h")" with an empty file name removed one directory name on MS-DOS. For Unix, when the file name is a directory, the directory name was removed. Now make it consistent: "%:p" adds a path separator for all systems, but no path separator is added in other situations. Unix: When checking for a CTRL-C (could happen any time) and there is an X event (e.g., clipboard updated) and there is typeahead, Vim would hang until a character was typed. MS-DOS, MS-Windows and Amiga: expanding "$ENV/foo" when $ENV ends in a colon, had the slash removed. ":he \^=" gave an error for using \_. ":he ^=" didn't find tag :set^=. Even "he :set^=" didn't find it. A tags file name "D:/tags" was used as file "tags" in "D:". That doesn't work when the current path for D: isn't the root of the drive. Removed calls to XtInitializeWidgetClass(), they shouldn't be necessary. When using a dtterm or various other color terminals, and the Normal group has been set to use a different background color, the background wouldn't always be displayed with that color. Added check for "ut" termcap entry: If it's missing, clearing the screen won't give us the current background color. Need to draw each character instead. Vim now also works when the "cl" (clear screen) termcap entry is missing. When repeating a "/" search command with a line offset, the "n" did use the offset but didn't make the motion linewise. Made "d/pat/+2" and "dn" do the same. Win32: Trying to use ":tearoff" for a menu that doesn't exist caused a crash. OpenPTY() didn't work on Sequent. Add a configure check for getpseudotty(). C-indenting: Indented a line starting with ")" with the matching "(", but not a line starting with "x)" looks strange. Also compute the indent for aligning with items inside the () and use the lowest indent. MS-DOS and Windows: ":n *.vim" also matched files ending in "~". Moved mch_expandpath() from os_win16.c and os_msdos.c to misc1.c, they are equal. Macintosh: (Dany St-Amant) - In Vi-compatible mode didn't read files with CR line separators. - Fixed a bug in the handling of Activate/Deactivate Event - Fixed a bug in gui_mch_dialog (using wrong pointer) Multibyte GDK XIM: While composing a multibyte-word, if user presses a mouse button, then the word is removed. It should remain and composing end. (Sung-Hyun Nam) MS-DOS, MS-Windows and OS/2: When reading from stdin, automatic CR-LF conversion by the C library got in the way of detecting a "dos" 'fileformat'. When 'smartcase' is set, patterns with "\S" would also make 'ignorecase' reset. When clicking the mouse in a column larger than 222, it moved to the first column. Can't encode a larger number in a character. Now limit the number to 222, don't jump back to the first column. GUI: In some versions CSI would cause trouble, either when typed directly or when part of a multibyte sequence. When using multibyte characters in a ":normal" command, a trailing byte that is CSI or K_SPECIAL caused problems. Wildmenu didn't handle multibyte characters. ":sleep 10" could not be interrupted on Windows, while "gs" could. Made them both work the same. Unix: When waiting for a character is interrupted by an X-windows event (e.g., to obtain the contents of the selection), the wait time would not be honored. A message could be overwritten quickly. Now compute the remaining waiting time. Windows: Completing "\\share\c$\S" inserted a backslash before the $ and then the name is invalid. Don't insert the backslash. When doing an auto-write before ":make", IObuff was overwritten and the wrong text displayed later. On the Mac the directories "c:/tmp" and "c:/temp" were used in the defaults for 'backupdir' and 'directory', they don't exist. The check for a new file not to be on an MS-DOS filesystem created the file temporarily, which can be slow. Don't do this if there is another check for the swap file being on an MS-DOS filesystem. Don't give the "Changing a readonly file" warning when reading from stdin. When using the "Save As" menu entry and not entering a file name, would get an error message for the trailing ":edit #". Now only do that when the alternate file name was changed. When Vim owns the X11 selection and is being suspended, an application that tries to use the selection hangs. When Vim continues it could no longer obtain the selection. Now give up the selection when suspending. option.h and globals.h were included in some files, while they were already included in vim.h. Moved the definition of EXTERN to vim.h to avoid doing it twice. When repeating an operator that used a search pattern and the search pattern contained characters that have a special meaning on the cmdline (e.g., CTRL-U) it didn't work. Fixed various problems with using K_SPECIAL (0x80) and CSI (0x9b) as a byte in a (multibyte) character. For example, the "r" command could not be repeated. The DOS/Windows install program didn't always work from a directory with a long filename, because $VIM and the executable name would not have the same path. Multi-byte: - Using an any-but character range [^x] in a regexp didn't work for UTF-8. (Muraoka Taro) - When backspacing over inserted characters in Replace mode multibyte characters were not handled correctly. (Muraoka Taro) - Search commands "#" and "*" didn't work with multibyte characters. (Muraoka Taro) - Word completion in Insert mode didn't work with multibyte characters. (Muraoka Taro) - Athena/Motif GUI: when 'linespace' is non-zero the cursor would be drawn too wide (number of bytes instead of cell width). - When changing 'encoding' to "euc-jp" and inserting a character Vim would crash. - For euc-jp characters positioning the cursor would sometimes be wrong. Also, with two characters with 0x8e leading byte only the first one would be displayed. - When using DYNAMIC_ICONV on Win32 conversion might fail because of using the wrong error number. (Muraoka Taro) - Using Alt-x in the GUI while 'encoding' was set to "utf-8" didn't produce the right character. - When using Visual block selection and only the left half of a double-wide character is selected, the highlighting continued to the end of the line. - Visual-block delete didn't work properly when deleting the right half of a double-wide character. - Overstrike mode for the cmdline replaced only the first byte of a multibyte character. - The cursor in Replace mode (also in the cmdline) was too small on a double-wide character. - When a multibyte character contained a 0x80 byte, it didn't work (was using a CSI byte instead). (Muraoka Taro) - Wordwise selection with the mouse didn't work. - Yanking a modeless selection of multibyte characters didn't work. - When 'selection' is "exclusive", selecting a word that ends in a multibyte character used wrong highlighting for the following character. Win32 with Make_mvc.mak: Didn't compile for debugging. (Craig Barkhouse) Win32 GUI: When "vimrun.exe" is used to execute an external command, don't give a message box with the return value, it was already printed by vimrun. Also avoid printing the return value of the shell when ":silent!" is used. Win32: selecting a lot of text and using the "find/replace" dialog caused a crash. X11 GUI: When typing a character with the 8th bit set and the Meta/Alt modifier, the modifier was removed without changing the character. Truncating a message to make it fit on the command line, using "..." for the middle, didn't always compute the space correctly. Could not imap <C-@>. Now it works like <Nul>. VMS: - Fixed a few things for VAXC. os_vms_fix.com had some strange CTRL-M characters. (Zoltan Arpadffy and John W. Hamill) - Added VMS-specific defaults for the 'isfname' and 'isprint' options. (Zoltan Arpadffy) - Removed os_vms_osdef.h, it's no longer used. The gzip plugin used a ":normal" command, this doesn't work when dropping a compressed file on Vim. In very rare situations a binary search for a tag would fail, because an uninitialized value happens to be half the size of the tag file. (Narendran) When using BufEnter and BufLeave autocommands to enable/disable a menu, it wasn't updated right away. When doing a replace with the "c"onfirm flag, the cursor was positioned after the ruler, instead of after the question. With a long replacement string the screen could scroll up and cause a "more" prompt. Now the message is truncated to make it fit. Motif: The autoconf check for the Xp library didn't work. When 'verbose' is set to list lines of a sourced file, defining a function would reset the counter used for the "more" prompt. In the Win32 find/replace dialog, a '/' character caused problems. Escape it with a backslash. Starting a shell with ":sh" was different from starting a shell for CTRL-Z when suspending doesn't work. They now work the same way. Jumping to a file mark while in a changed buffer gave a "mark not set" error. ":execute histget("cmd")" causes an endless loop and crashed Vim. Now catch all commands that cause too much recursiveness. Removed "Failed to open input method" error message, too many people got this when they didn't want to use a XIM. GUI: When compiled without the +windows feature, the scrollbar would start below line one. Removed the trick with redefining character class functions from regexp.c. Win32 GUI: Find dialog gives focus back to main window, when typing a character mouse pointer is blanked, it didn't reappear when moving it in the dialog window. (Vince Negri) When recording and typing a CTRL-C, no character was recorded. When in Insert mode or cancelling half a command, playing back the recorded sequence wouldn't work. Now record the CTRL-C. When the GUI was started, mouse codes for DEC and netterm were still checked for. GUI: When scrolling and 'writedelay' is non-zero, the character under the cursor was displayed in the wrong position (one line above/below with CTRL-E/CTRL-Y). A ":normal" command would reset the 'scrollbind' info. Causes problems when using a ":normal" command in an autocommand for opening a file. Windows GUI: a point size with a dot, like "7.5", wasn't recognized. (Muraoka Taro) When 'scrollbind' wasn't set would still remember the current position, wasting time. GTK: Crash when 'shell' doesn't exist and doing":!ls". Use _exit() instead of exit() when the child couldn't execute the shell. Multi-byte: - GUI with double-byte encoding: a mouse click in left half of double-wide character put the cursor in previous char. - Using double-byte encoding and 'selection' is "exclusive": "vey" and "^Vey" included the character after the word. - When using a double-byte encoding and there is a lead byte at the end of the line, the preceding line would be displayed. "ga" also showed wrong info. - "gf" didn't include multibyte characters before the cursor properly. (Muraoka Taro) GUI: The cursor was sometimes not removed when scrolling. Changed the policy from redrawing the cursor after each call to gui_write() to only update it at the end of update_screen() or when setting the cursor position. Also only update the scrollbars at the end of update_screen(), that's the only place where the window text may have been scrolled. Formatting "/*<Tab>long text", produced "* <Tab>" in the next line. Now remove the space before the Tab. Formatting "/*<Tab> long text", produced "* <Tab> long text" in the next line. Now keep the space after the Tab. In some places non-ASCII alphabetical characters were accepted, which could cause problems. For example, ":X" (X being such a character). When a pattern matches the end of the line, the last character in the line was highlighted for 'hlsearch'. That looks wrong for "/\%3c". Now highlight the character just after the line. Motif: If a dialog was closed by clicking on the "X" of the window frame Vim would no longer respond. When using CTRL-X or CTRL-A on a number with many leading zeros, Vim would crash. (Matsumoto) When 'insertmode' is set, the mapping in mswin.vim for CTRL-V didn't work in Select mode. Insert mode wasn't restarted after overwriting the text. Now allow nesting Insert mode with insert and change commands. CTRL-O cwfoo<Esc> now also works. Clicking with the right mouse button in another window started Visual mode, but used the start position of the current window. Caused ml_get errors when the line number was invalid. Now stay in the same window. When 'selection' is "exclusive", "gv" sometimes selected one character fewer. When 'comments' contains more than one start/middle/end triplet, the optional flags could be mixed up. Also didn't align the end with the middle part. Double-right-click in Visual mode didn't update the shown mode. When the Normal group has a font name, it was never used when starting up. Now use it when 'guifont' and 'guifontset' are empty. Setting a font name to a highlight group before the GUI was started didn't work. "make test" didn't use the name of the generated Vim executable. 'cindent' problems: - Aligned with an "else" inside a do-while loop for a line below that loop. (Meikel Brandmeyer) - A line before a function would be indented even when terminated with a semicolon. (Meikel Brandmeyer) - 'cindent' gave too much indent to a line after a "};" that ends an array init. - Support declaration lines ending in "," and "\". (Meikel Brandmeyer) - A case statement inside a do-while loop was used for indenting a line after the do-while loop. (Meikel Brandmeyer) - When skipping a string in a line with one double quote it could continue in the previous line. (Meikel Brandmeyer) When 'list' is set, 'hlsearch' didn't highlight a match at the end of the line. Now highlight the '$'. The Paste menu item in the menu bar, the popup menu and the toolbar were all different. Now made them all equal to how it was done in mswin.vim. st_dev can be smaller than "unsigned". The compiler may give an overflow warning. Added a configure check for dev_t. Athena: closing a confirm() dialog killed Vim. Various typos in the documentation. (Matt Dunford) Python interface: The definition of _DEBUG could cause trouble, undefine it. The error message for not being able to load the shared library wasn't translated. (Muraoka Taro) Mac: (Dany St-Amant and Axel Kielhorn) - Several fixes. - Vim was eating 80% of the CPU time. - The project os_mac.pbxproj didn't work, Moved it to a subdirectory. - Made the menu priority work for the menubar. - Fixed a problem with dragging the scrollbar. - Cleaned up the various #ifdefs. Unix: When catching a deadly signal and we keep getting one use _exit() to exit in a quick and dirty way. Athena menu ordering didn't work correctly. (David Harrison) A ":make" or ":grep" command with a long argument could cause a crash. Doing ":new file" and using "Quit" for the ATTENTION dialog still opened a new window. GTK: When starting the GUI and there is an error in the .vimrc file, don't present the wait-return prompt, since the message was given in the terminal. When there was an error in a .vimrc file the terminal where gvim was started could be cleared. Set msg_row in main.c before writing any messages. GTK and X11 GUI: When trying to read characters from the user (e.g. with input()) before the Vim window was opened caused Vim to hang when it was started from the desktop. OS/390 uses 31 bit pointers. That broke some computations with MAX_COL. Reduce MAX_COL by one bit for OS/390. (Ralf Schandl) When defining a function and it already exists, Vim didn't say it existed until after typing it. Now do this right away when typing it. The message remembered for displaying later (keep_msg) was sometimes pointing into a generic buffer, which might be changed by the time the message is displayed. Now make a copy of the message. When using multibyte characters in a menu and a trailing byte is a backslash, the menu would not be created correctly. (Muraoka Taro) Using a multibyte character in the substitute string where a trail byte is a backslash didn't work. (Muraoka Taro) When setting "t_Co" in a vimrc file, then setting it automatically from an xterm termresponse and then setting it again manually caused a crash. When getting the value of a string option that is not supported, the number zero was returned. This breaks a check like "&enc == "asdf". Now an empty string is returned for string options. Crashed when starting the GTK GUI while using 'notitle' in the vimrc, setting 'title' in the gvimrc and starting the GUI with ":gui". Closed the connection to the X server accidentally. Had to hit return after selecting an entry for ":ts". The message from ":cn" message was sometimes cleared. Now display it after redrawing if it doesn't cause a scroll (truncated when necessary). hangulin.c didn't compile when the GUI was disabled. Disable it when it won't work. When setting a termcap option like "t_CO", the value could be displayed as being for a normal key with a modifier, like "<M-=>". When expanding the argument list, entries which are a directory name did not get included. This stopped "vim c:/" from opening the file explorer. ":syn match sd "^" nextgroup=asdf" skipped the first column and matched the nextgroup in the second column. GUI: When 'lazyredraw' is set, 'showmatch' didn't work. Required flushing the output. Don't define the <NetMouse> termcode in an xterm, reduces the problem when someone types <Esc> } in Insert mode. Made slash_adjust() work correctly for multibyte characters. (Yasuhiro Matsumoto) Using a filename in Big5 encoding for autocommands didn't work (backslash in trailbyte). (Yasuhiro Matsumoto) DOS and Windows: Expanding *.vim also matched file.vimfoo. Expand path like Unix to avoid problems with Windows dir functions. Merged the DOS and Win32 functions. Win32: GvimExt could not edit more than a few files at once, the length of the argument was fixed. "ls -1 * | xargs vim" worked, but the input was in cooked mode. Now switch to raw mode when needed. Use dup() to copy the stderr file descriptor to stdin to make shell commands work. No longer requires an external program to do this. When using ":filetype off", ftplugin and indent usage would be switched off at the same time. Don't do this, setting 'filetype' manually can still use them. GUI: When writing a double-byte character, it could be split up in two calls to gui_write(), which doesn't work. Now flush before the output buffer becomes full. When 'laststatus' is set and 'cmdheight' is two or bigger, the intro message would be written over the status line. The ":intro" command didn't work when there wasn't enough room. Configuring for Ruby failed with a recent version of Ruby. (Akinori Musha) Athena: When deleting the directory in which Vim was started, using the file browser made Vim exit. Removed the use of XtAppError(). When using autoconf 2.50, UNIX was not defined. Moved the comment for "#undef UNIX" to a separate line. Win32: Disabled _OnWindowPosChanging() to make maximize work better. Win32: Compiling with VC 4.0 didn't work. (Walter Briscoe) Athena: - Finally fixed the problems with deleting a menu. (David Harrison) - Athena: When closing the confirm() dialog, worked like OK was pressed, instead of Cancel. The file explorer didn't work in compatible mode, because of line continuation. Didn't give an error message for ":digraph a". When using Ex mode in the GUI and typing a special key, <BS> didn't delete it correctly. Now display '?' for a special key. When an operator is pending, clicking in another window made it apply to that window, even though the line numbers could be beyond the end of the buffer. When a function call doesn't have a terminating ")" Vim could crash. Perl interface: could crash on exit with perl 5.6.1. (Anduin Withers) Using %P in 'errorformat' wasn't handled correctly. (Tomas Zellerin) Using a syntax cluster that includes itself made Vim crash. GUI: With 'ls' set to 2, dragging the status line all the way up, then making the Vim window smaller: Could not the drag status line anymore. "vim -c startinsert! file" placed cursor on last char of a line, instead of after it. A ":set" command in the buffer menu set w_set_curswant. Now don't do this when w_curswant is MAXCOL. Win32: When the gvim window was maximized and selecting another font, the window would no longer fill the screen. The line with 'pastetoggle' in ":options" didn't show the right value when it is a special key. Hitting <CR> didn't work either. Formatting text, resulting in a % landing in the first line, repeated the % in the following lines, like it's the start of a comment. GTK: When adding a toolbar item while gvim is already running, it wasn't possible to use the tooltip. Now it works by adding the tooltip first. The output of "g CTRL-G" mentioned "Char" but it's actually bytes. Searching for the end of a oneline region didn't work correctly when there is an offset for the highlighting. Syntax highlighting: When synchronizing on C-comments, //*/ was seen as the start of a comment. Win32: Without scrollbars present, the MS mouse scroll wheel didn't work. Also handle the scrollbars when they are not visible. Motif: When there is no right scrollbar, the bottom scrollbar would still leave room for it. (Marcin Dalecki) When changing 'guicursor' and the value is invalid, some of the effects would still take place. Now first check for errors and only make the new value effective when it's OK. Using "A" In Visual block mode, appending to lines that don't extend into the block, padding was wrong. When pasting a block of text, a character that occupies more than one screen column could be deleted and spaces inserted instead. Now only do that with a tab. Fixed conversion of documentation to HTML using Perl. (Dan Sharp) Give an error message when a menu name starts with a dot. Avoid a hang when executing a shell from the GUI on HP-UX by pushing "ptem" even when sys/ptem.h isn't present. When creating the temp directory, make sure umask is 077, otherwise the directory is not accessible when it was set to 0177. Unix: When resizing the window and a redraw is a bit slow, could get a window resize event while redrawing, resulting in a messed up window. Any input (e.g., a mouse click) would redraw. The "%B" item in the status line became zero in Insert mode (that's normal) for another than the current window. The menu entries to convert to xxd and back didn't work in Insert mode. When ":vglobal" didn't find a line where the pattern doesn't match, the error message would be the wrong way around. When ignoring a multi-line error message with "%-A", the continuation lines would be used anyway. (Servatius Brandt) "grx" on a double-wide character inserted "x", instead of replacing the character with "x ". "gR" on <xx> ('display' set the "uhex") didn't replace at all. When doing "gRxx" on a control character the first "x" would be inserted, breaking the alignment. Added "0)" to 'cinkeys', so that when typing a ) it is put in the same place as where "==" would put it. Win32: When maximized, adding/removing toolbar didn't resize the text area. When using <C-RightMouse> a count was discarded. When typing CTRL-V and <RightMouse> in the command line, would insert <LeftMouse>. Using "vis" or "vas" when 'selection' is exclusive didn't include the last character. When adding to an option like 'grepprg', leading space would be lost. Don't expand environment variables when there is no comma separating the items. GUI: When using a bold-italic font, would still use the bold trick and underlining. Motif: The default button didn't work in dialogs, the first one was always used. Had to give input focus to the default button. When using CTRL-T to jump within the same file, the '' mark wasn't set. Undo wasn't Vi compatible when using the 'c' flag for ":s". Now it undoes the whole ":s" command instead of each confirmed replacement. The Buffers menu, when torn-off, disappeared when being refreshed. Add a dummy item to avoid this. Removed calling msg_start() in main(), it should not be needed. vim_strpbrk() did not support multibyte characters. (Muraoka Taro) The Amiga version didn't compile, the code was too big for relative jumps. Moved a few files from ex_docmd.c to ex_cmds2.c When evaluating the "= register resulted in the "= register being changed, Vim would crash. When doing ":view file" and it fails, the current buffer was made read-only. Motif: For some people the separators in the toolbar disappeared when resizing the Vim window. (Marcin Dalecki) Win32 GUI: when setting 'lines' to a huge number, would not compute the available space correctly. Was counting the menu height twice. Conversion of the docs to HTML didn't handle the line with the +quickfix tag correctly. (Antonio Colombo) Win32: fname_case() didn't handle multibyte characters correctly. (Yasuhiro Matsumoto) The Cygwin version had trouble with fchdir(). Don't use that function for Cygwin. The generic check in scripts.vim for "conf" syntax was done before some checks in filetype.vim, resulting in "conf" syntax too often. Dos32: Typing lagged behind. Would wait for one biostick when checking if a character is available. GTK: When setting 'columns' while starting up "gvim", would set the width of the terminal it was started in. When using ESC in Insert mode, an autoindent that wraps to the next line caused the cursor to move to the end of the line temporarily. When the character before the cursor was a double-wide multibyte character the cursor would be on the right half, which causes problems with some terminals. Didn't handle multibyte characters correctly when expanding a file name. (Yasuhiro Matsumoto) Win32 GUI: Errors generated before the GUI is decided to start were not reported. globpath() didn't reserve enough room for concatenated results. (Anduin Withers) When expanding an option that is very long already, don't do the expansion, it would be truncated to MAXPATHL. (Anduin Withers) When 'selection' is "exclusive", using "Fx" in Visual mode only moved until just after the character. When using IME on the console to enter a file name, the screen may scroll up. Redraw the screen then. (Yasuhiro Matsumoto) Motif: In the find/replace dialog the "Replace" button didn't work first time, second time it replaced all matches. Removed the use of ":s///c". GTK: Similar problems with the find/replace dialog, moved the code to a common function. X11: Use shared GC's for text. (Marcin Dalecki) "]i" found the match under the cursor, instead of the first one below it. Same for "]I", "] CTRL-I", "]d", "]D" and "] CTRL-D". Win16: When maximized and the font is changed, don't change the window size. (Vince Negri) When 'lbr' is set, deleting a block of text could leave the cursor in the wrong position. Win32: When opening a file with the "Edit with Vim" popup menu entry, wildcards would cause trouble. Added the "--literal" argument to avoid expanding file names. When using "gv", it didn't restore that "$" was used in Visual block mode. Win32 GUI: While waiting for a shell command to finish, the window wasn't redrawn at all. (Yasuhiro Matsumoto) Syntax highlighting: A match that continues on a next line because of a contained region didn't end when that region ended. The ":s" command didn't allow flags like 'e' and 'i' right after it. When using ":s" to split a line, marks were moved to the next line. Vi keeps them in the first line. When using ":n" ":rew", the previous context mark was at the top of the file, while Vi puts it in the same place as the cursor. Made it Vi compatible. Fixed Vi incompatibility: Text was not put in register 1 when using "c" and "d" with a motion character, when deleting within one line with one of the commands: % ( ) `<character> / ? N n { } Win32 GUI: The tooltip for tear-off items remained when the tear-off item was no longer selected. GUI: When typing ":" at the more prompt, would return to Normal mode and not redraw the screen. When starting Vim with an argument "-c g/at/p" the printed lines would overwrite each other. BeOS: Didn't compile. Configure didn't add the os_beos files, the QNX check removed them. Various changes to os_beos.cc. (Joshua Haberman) Removed the check for the hardware platform, the BeBox has not been produced for a long time now. Win32 GUI: don't use a message box when the shell returns an error code, display the message in the Vim window. Make_mvc.mak always included "/debug" for linking. "GUI=no" argument didn't work. Use "DEBUG=yes" instead of "DEBUG=1" to make it consistent. (Dan Sharp) When a line in the tags file ended in ;" (no TAB following) the command would not be recognized as a search command. X11: The inputMethod resource never worked. Don't use the "none" input method for SGI, it apparently makes the first character in Input method dropped. Fixed incorrect tests in os_mac.h. (Axel Kielhorn) Win32 console: When the console where Vim runs in is closed, Vim could hang in trying to restore the window icon. (Yasuhiro Matsumoto) When using ":3call func()" or ":3,3call func() the line number was ignored. When 'showbreak' and 'linebreak' were both set, Visual highlighting sometimes continued until the end of the line. GTK GUI: Tearoff items were added even when 'guioptions' didn't contain 't' when starting up. MS-Windows: When the current directory includes a "~", searching files with "gf" or ":find" didn't work. A "$" in the directory had the same problem. Added mch_has_exp_wildcard() functions. When reducing the Vim window height while starting up, would get an out-of-memory error message. When editing a very long search pattern, 'incsearch' caused the redraw of the command line to fail. Motif GUI: On some systems the "Help" menu would not be on the far right, as it should be. On some other systems (esp. IRIX) the command line would not completely show. Solution is to only resize the menubar for Lesstif. Using "%" in a line that contains "\\" twice didn't take care of the quotes properly. Now make a difference between \" and \\". For non-Unix systems a dummy file is created when finding a swap name to detect a 8.3 filesystem. When there is an existing swap file, would get a warning for the file being created outside of Vim. Also, when closing the Vim window the file would remain. Motif: The menu height was always computed, using a "-menuheight" argument was setting the room for the command line. Now make clear the argument is not supported. For some (EBCDIC) systems, POUND was equal to '#'. Added an #if for that to avoid a duplicate case in a switch. The GUI may have problems when forking. Always call _exit() instead of exit() in the parent, the child will call exit(). Win32 GUI: Accented characters were often wrong in dialogs and tearoff menus. Now use CP_ACP instead of CP_OEMCP. (Vince Negri) When displaying text with syntax highlighting causes an error (e.g., running out of stack) the syntax highlighting is disabled to avoid further messages. When a command in a .vimrc or .gvimrc causes an ATTENTION prompt, and Vim was started from the desktop (no place to display messages) it would hang. Now open the GUI window early to be able to display the messages and pop up the dialog. "r<CR>" on a multibyte character deleted only the first byte of the character. "3r<CR>" deleted three bytes instead of three characters. When interrupting reading a file, Vi considers the buffer modified. Added the 'i' flag in 'cpoptions' flag for this (we don't want it modified to be able to do ":q"). When using an item in 'guicursor' that starts with a colon, Vim would get stuck or crash. When putting a file mark in a help file and later jumping back to it, the options would not be set. Extended the modeline in all help files to make this work better. When a modeline contained "::" the local option values would be printed. Now ignore it. Some help files did not use a 8.3 names, which causes problems when using MS-DOS unzip. Renamed "multibyte.txt" to "mbyte.txt", "rightleft.txt" to "rileft.txt", "tagsearch.txt" to "tagsrch.txt", "os_riscos.txt" to "os_risc.txt". When Visual mode is blockwise, using "iw" or "aw" made it characterwise. That doesn't seem right, only do this when in linewise mode. But then do it always, not only when start and end of Visual mode are equal. When using "viw" on a single-letter word and 'selection' is exclusive, would not include the word. When formatting text from Insert mode, using CTRL-O, could mess up undo information. While writing a file (also for the backup file) there was no check for an interrupt (hitting CTRL-C). Vim could hang when writing a large file over a slow network, and moving the mouse didn't make it appear (when 'mousehide' is set) and the screen wasn't updated in the GUI. Also allow interrupting when syncing the swap file, it can take a long time. When using ":mksession" while there is help window, it would later be restored to the right file but not marked as a help buffer. ":help" would then open another window. Now use the value "help" for 'buftype' to mark a help buffer. The session file contained absolute path names in option values, that doesn't work when the home directory depends on the situation. Replace the home directory with ~/ when possible. When using 'showbreak' a TAB just after the shown break would not be counted correctly, the cursor would be positioned wrong. With 'showbreak' set to "--->" or "------->" and 'sts' set to 4, inserting tabs did not work right. Could cause a crash. Backspacing was also wrong, could get stuck at a line break. Win32: crashed when tearing off a menu with over 300 items. GUI: A menu or toolbar item would appear when only a tooltip was defined for it. When 'scrolloff' is non-zero and "$" is in 'cpoptions', using "s" while the last line of the file is the first line on screen, the text wasn't displayed. When running "autoconf", delete the configure cache to force starting cleanly when configure is run again. When changing the Normal colors for cterm, the value of 'background' was changed even when the GUI was used. The warning for a missing vimrun.exe was always given on startup, but some people just editing a file don't need to be bothered by it. Only show it when vimrun would be used. When using "%" in a multibyte text it could get confused by trailbytes that match. (Muraoka Taro) Termcap entry for RiscOS was wrong, using 7 and 8 in octal codes. Athena: The title of a dialog window and the file selector window were not set. (David Harrison) The "htmlLink" highlight group specified colors, which gives problems when using a color scheme. Added the "Underlined" highlight group for this. After using ":insert" or ":change" the '[ mark would be one line too low. When looking for the file name after a match with 'include' one character was skipped. Same for 'define'. Win32 and DJGPP: When editing a file with a short name in a directory, and editing the same file but using the long name, would end up with two buffers on the same file. "gf" on a filename that starts with "../" only worked when the file being edited is in the current directory. An include file search didn't work properly for files starting with "../" or ".". Now search both relative to the file and to the current directory. When 'printheader', 'titlestring', 'iconstring', 'rulerformat' or 'statusline' contained "%{" but no following "}" memory was corrupted and a crash could happen. ":0append" and then inserting two lines did not redraw the blank lines that were scrolled back down. When using insert mode completion in a narrow window, the message caused a scroll up. Now shorten the message if it doesn't fit and avoid writing the ruler over the message. XIM still didn't work correctly on some systems, especially SGI/IRIX. Added the 'imdisable' option, which is set by default for that system. Patch 6.0aw.008 问题: When the first character of a file name is over 127, the Buffers menu entry would get a negative priority and cause problems. 解决方案: Reduce the multiplier for the first character when computing the hash value for a Buffers menu entry. 相关文件: runtime/menu.vim Patch 6.0aw.010 问题: Win32: ":browse edit dir/dir" didn't work. (Vikas) 解决方案: Change slashes to backslashes in the directory passed to the file browser. 相关文件: src/gui_w48.c Athena file browser: On some systems wcstombs() can't be used to get the length of a multibyte string. Use the maximum length then. (Yasuhiro Matsumoto) Patch 6.0ax.001 问题: When 'patchmode' is set, appending to a file gives an empty original file. (Ed Ralston) 解决方案: Also make a backup copy when appending and 'patchmode' is set. 相关文件: src/fileio.c Patch 6.0ax.002 问题: When 'patchmode' is set, appending to a compressed file gives an uncompressed original file. (Ed Ralston) 解决方案: Create the original file before decompressing. 相关文件: runtime/plugin/gzip.vim Patch 6.0ax.005 问题: Athena file selector keeps the title of the first invocation. 解决方案: Set the title each time the file selector is opened. (David Harrison) 相关文件: src/gui_at_fs.c Patch 6.0ax.007 问题: When using GPM (mouse driver in a Linux console) a double click is interpreted as a scroll wheel click. 解决方案: Check if GPM is being used when deciding if a mouse event is for the scroll wheel. 相关文件: src/term.c Patch 6.0ax.010 问题: The Edit.Save menu and the Save toolbar button didn't work when the buffer has no file name. 解决方案: Use a file browser to ask for a file name. Also fix the toolbar Find item in Visual mode. 相关文件: runtime/menu.vim Patch 6.0ax.012 问题: When 'cpoptions' contains "$", breaking a line for 'textwidth' doesn't redraw properly. (Stefan Schulze) 解决方案: Remove the dollar before breaking the line. 相关文件: src/edit.c Patch 6.0ax.014 问题: Win32: On Windows 98 ":make -f file" doesn't work when 'shell' is "command.com" and 'makeprg' is "nmake". The environment isn't passed on to "nmake". 解决方案: Also use vimrun.exe when redirecting the output of a command. 相关文件: src/os_win32.c Patch 6.0ax.016 问题: The version number was reported wrong in the intro screen. 解决方案: Check for a version number with two additional letters. 相关文件: src/version.c Patch 6.0ax.019 问题: When scrolling a window with folds upwards, switching to another vertically split window and back may not update the scrollbar. 解决方案: Limit w_botline to the number of lines in the buffer plus one. 相关文件: src/move.c

6.1 版 本 version-6.1

本小节讨论 6.0 和 6.1 版本之间的改进。 这是一个漏洞修正版。其实没有什么新特性。 改动 changed-6.1

用 ":lmap" 定义语言映射时,不再有设置 'iminsert''imsearch' 的副作用。 新增 added-6.1

语法文件: ampl AMPL (David Krief) ant Ant (Johannes Zellner) baan Baan (Her van de Vliert) cs C# (Johannes Zellner) lifelines Lifelines (Patrick Texier) lscript LotusScript (Taryn East) moo MOO (Timo Frenay) nsis NSIS (Alex Jakushev) ppd Postscript Printer Description (Bjoern Jacke) rpl RPL/2 (Joel Bertrand) scilab Scilab (Benoit Hamelin) splint Splint (Ralf Wildenhues) sqlj SQLJ (Andreas Fischbach) wvdial WvDial (Prahlad Vaidyanathan) xf86conf XFree86 config (Nikolai Weibull) xmodmap Xmodmap (Nikolai Weibull) xslt Xslt (Johannes Zellner) monk Monk (Mike Litherland) xsd Xsd (Johannes Zellner) cdl CDL (Raul Segura Acevedo) sendpr Send-pr (Hendrik Scholz) 加入 Scheme 缩进文件。(Dorai Sitaram) 加入 Prolog 缩进文件。(Kontra Gergely) 加入 Povray 缩进文件。(David Necas) 加入 IDL 缩进文件 (Aleksandar Jelenak) 加入 C# 缩进和文件类型插件脚本。 加入乌克兰语菜单翻译。(Bohdan Vlasyuk) 加入捷克菜单的 ASCII 版本。(Jiri Brezina) 加入教程的简体中文翻译。(Mendel L Chan) 加入 yawerty 键盘的俄罗斯键盘映射表。 教程里加上使用 vimrc 文件的解释。 修改 tutor.vim,台湾版教程能使用合适的编码。 加入俄语教程。(Andrey Kiselev) 加入波兰语教程。(Mikolaj Machowski) 加入 darkblue 色彩方案。(Bohdan Vlasyuk) 打包时,dos 语言归档自动生成需要的 .mo 文件。 改进了 NSIS 脚本以支持 NSIS 180。加入打开/关闭状态的图标。(Mirek Pruchnik) cp1250 版本的斯洛伐克消息翻译版本。 IRIX 编译器的编译器插件。(David Harrison) 修正 fixed-6.1

The license text was updated to make the meaning clearer and make it compatible with the GNU GPL. Otherwise distributors have a problem when linking Vim with a GPL'ed library. When installing the "less.sh" script it was not made executable. (Chuck Berg) Win32: The "9" key on the numpad wasn't working. (Julian Kinraid) The NSIS install script didn't work with NSIS 1.80 or later. Also add Vim-specific icons. (Pruchnik) The script for conversion to HTML contained an "if" in the wrong place. (Michael Geddes) Allow using ":ascii" in the sandbox, it's harmless. Removed creat() from osdef2.h.in, it wasn't used and may cause a problem when it's redefined to creat64(). The text files in the VisVim directory were in "dos" format. This caused problems when applying a patch. Now keep them in "unix" format and convert them to "dos" format only for the PC archives. Add ruby files to the dos source archive, they can be used by Make_mvc.mak. (Mirek Pruchnik) "cp -f" doesn't work on all systems. Change "cp -f" in the Makefile to "rm -f" and "cp". Didn't compile on a Compaq Tandem Himalaya OSS. (Michael A. Benzinger) The GTK file selection dialog didn't include the "Create Dir", "Delete File" and "Rename File" buttons. When doing ":browse source" the dialog has the title "Run Macro". Better would be "Source Vim script". (Yegappan Lakshmanan) Win32: Don't use the printer font as default for the font dialog. "make doslang" didn't work when configure didn't run (yet). Set $MAKEMO to "yes". (Mirek Pruchnik) The ToolBar TagJump item used "g]", which prompts for a selection even when there is only one matching tag. Use "g<C-]>" instead. The ming makefile for message translations didn't have the right list of files. The MS-Windows 3.1 version complains about LIBINTL.DLL not found. Compile this version without message translations. The Borland 5 makefile contained a check for Ruby which is no longer needed. The URLs for the TCL library was outdated. (Dan Sharp) The eviso.ps file was missing from the DOS runtime archive, it's needed for printing PostScript in the 32bit DOS version. In menu files ":scriptencoding" was used in a wrong way after patch 6.1a.032 Now use ":scriptencoding" in the file where the translations are given. Do the same for all menus in latin1 encoding. Included a lot of fixes for the Macintosh, mostly to make it work with Carbon. (Dany StAmant, Axel Kielhorn, Benji Fisher) Improved the vimtutor shell script to use $TMPDIR when it exists, and delete the copied file when exiting in an abnormal way. (Max Ischenko) When "iconv.dll" can't be found, try using "libiconv.dll". When encryption is used, filtering with a shell command wasn't possible. DJGPP: ":cd c:" always failed, can't get permissions for "c:". Win32: ":cd c:/" failed if the previous current directory on c: had become invalid. DJGPP: Shift-Del and Del both produce \316\123. Default mapping for Del is wrong. Disabled it. Dependencies on header files in MingW makefile was wrong. Win32: Don't use ACL stuff for MSVC 4.2, it's not supported. (Walter Briscoe) Win32 with Borland: bcc.cfg was caching the value for $(BOR), but providing a different argument to make didn't regenerate it. Win32 with MSVC: Make_ivc.mak generates a new if_ole.h in a different directory, the if_ole.h in the src directory may be used instead. Delete the distributed file. When a window is vertically split and then ":ball" is used, the window layout is messed up, can cause a crash. (Muraoka Taro) When 'insertmode' is set, using File/New menu and then double clicking, "i" is soon inserted. (Merlin Hansen) When Select mode is active and using the Buffers menu to switch to another buffer, an old selection comes back. Reset VIsual_reselect for a ":buffer" command. When Select mode is active and 'insertmode' is set, using the Buffers menu to switch to another buffer, did not return to Insert mode. Make sure "restart_edit" is set. When double clicking on the first character of a word while 'selection' is "exclusive" didn't select that word. Patch 6.0.001 问题: Loading the sh.vim syntax file causes error messages. (Corinna Vinschen) 解决方案: Add an "if". (Charles Campbell) 相关文件: runtime/syntax/sh.vim Patch 6.0.002 问题: Using a '@' item in 'viminfo' doesn't work. (Marko Leipert) 解决方案: Add '@' to the list of accepted items. 相关文件: src/option.c Patch 6.0.003 问题: The configure check for ACLs on AIX doesn't work. 解决方案: Fix the test program so that it compiles. (Tomas Ogren) 相关文件: src/configure.in, src/auto/configure Patch 6.0.004 问题: The find/replace dialog doesn't reuse a previous argument properly. 解决方案: After removing a "\V" terminate the string. (Zwane Mwaikambo) 相关文件: src/gui.c Patch 6.0.005 问题: In Insert mode, "CTRL-O :ls" has a delay before redrawing. 解决方案: Don't delay just after wait_return() was called. Added the did_wait_return flag. 相关文件: src/globals.h, src/message.c, src/normal.c, src/screen.c Patch 6.0.006 问题: With a vertical split, 'number' set and 'scrolloff' non-zero, making the window width very small causes a crash. (Niklas Lindstrom) 解决方案: Check for a zero width. 相关文件: src/move.c Patch 6.0.007 问题: When setting 'filetype' while there is no FileType autocommand, a following ":setfiletype" would set 'filetype' again. (Kobus Retief) 解决方案: Set did_filetype always when 'filetype' has been set. 相关文件: src/option.c Patch 6.0.008 问题: 'imdisable' is missing from the options window. (Michael Naumann) 解决方案: Add an entry for it. 相关文件: runtime/optwin.vim Patch 6.0.009 问题: Nextstep doesn't have S_ISBLK. (John Beppu) 解决方案: Define S_ISBLK using S_IFBLK. 相关文件: src/os_unix.h Patch 6.0.010 问题: Using "gf" on a file name starting with "./" or "../" in a buffer without a name causes a crash. (Roy Lewis) 解决方案: Check for a NULL file name. 相关文件: src/misc2.c Patch 6.0.011 问题: Python: After replacing or deleting lines get an ml_get error. (Leo Lipelis) 解决方案: Adjust the cursor position for deleted or added lines. 相关文件: src/if_python.c Patch 6.0.012 问题: Polish translations contain printf format errors, this can result in a crash when using one of them. 解决方案: Fix for translated messages. (Michal Politowski) 相关文件: src/po/pl.po Patch 6.0.013 问题: Using ":silent! cmd" still gives some error messages, like for an invalid range. (Salman Halim) 解决方案: Reset emsg_silent after calling emsg() in do_one_cmd(). 相关文件: src/ex_docmd.c Patch 6.0.014 问题: When 'modifiable' is off and 'virtualedit' is "all", "rx" on a TAB still changes the buffer. (Muraoka Taro) 解决方案: Check if saving the line for undo fails. 相关文件: src/normal.c Patch 6.0.015 问题: When 'cpoptions' includes "S" and "filetype plugin on" has been used, can get an error for deleting the b:did_ftplugin variable. (Ralph Henderson) 解决方案: Only delete the variable when it exists. 相关文件: runtime/ftplugin.vim Patch 6.0.016 问题: bufnr(), bufname() and bufwinnr() don't find unlisted buffers when the argument is a string. (Hari Krishna Dara) Also for setbufvar() and getbufvar(). 解决方案: Also find unlisted buffers. 相关文件: src/eval.c Patch 6.0.017 问题: When 'ttybuiltin' is set and a builtin termcap entry defines t_Co and the external one doesn't, it gets reset to empty. (David Harrison) 解决方案: Only set t_Co when it wasn't set yet. 相关文件: src/term.c Patch 6.0.018 问题: Initializing 'encoding' may cause a crash when setlocale() is not used. (Dany St-Amant) 解决方案: Check for a NULL pointer. 相关文件: src/mbyte.c Patch 6.0.019 问题: Converting a string with multibyte characters to a printable string, e.g., with strtrans(), may cause a crash. (Tomas Zellerin) 解决方案: Correctly compute the length of the result in transstr(). 相关文件: src/charset.c Patch 6.0.020 问题: When obtaining the value of a global variable internally, could get the function-local value instead. Applies to using <Leader> and <LocalLeader> and resetting highlighting in a function. 解决方案: Prepend "g:" to the variable name. (Aric Blumer) 相关文件: src/syntax.c, src/term.c Patch 6.0.021 问题: The 'cscopepathcomp' option didn't work. 解决方案: Change USE_CSCOPE to FEAT_CSCOPE. (Mark Feng) 相关文件: src/option.c Patch 6.0.022 问题: When using the 'langmap' option, the second character of a command starting with "g" isn't adjusted. 解决方案: Apply 'langmap' to the second character. (Alex Kapranoff) 相关文件: src/normal.c Patch 6.0.023 问题: Loading the lhaskell syntax doesn't work. (Thore B. Karlsen) 解决方案: Use ":runtime" instead of "source" to load haskell.vim. 相关文件: runtime/syntax/lhaskell.vim Patch 6.0.024 问题: Using "CTRL-V u 9900" in Insert mode may cause a crash. (Noah Levitt) 解决方案: Don't insert a NUL byte in the text, use a newline. 相关文件: src/misc1.c Patch 6.0.025 问题: The pattern "\vx(.|$)" doesn't match "x" at the end of a line. (Preben Peppe Guldberg) 解决方案: Always see a "$" as end-of-line after "\v". Do the same for "^". 相关文件: src/regexp.c Patch 6.0.026 问题: GTK: When using arrow keys to navigate through the menus, the separators are selected. 解决方案: Set the separators "insensitive". (Pavel Kankovsky) 相关文件: src/gui_gtk.c, src/gui_gtk_x11.c Patch 6.0.027 问题: VMS: Printing doesn't work, the file is deleted too quickly. No longer need the VMS specific printing menu. gethostname() is not available with VAXC. The makefile was lacking selection of the tiny-huge feature set. 解决方案: Adjust the 'printexpr' option default. Fix the other problems and update the documentation. (Zoltan Arpadffy) 相关文件: runtime/doc/os_vms.txt, runtime/menu.vim, src/INSTALLvms.txt, src/Make_vms.mms, src/option.c, src/os_unix.c, src/os_vms_conf.h Patch 6.0.028 问题: Can't compile without +virtualedit and with +visualextra. (Geza Lakner) 解决方案: Add an #ifdef for +virtualedit. 相关文件: src/ops.c Patch 6.0.029 问题: When making a change in line 1, then in line 2 and then deleting line 1, undo info could be wrong. Only when the changes are undone at once. (Gerhard Hochholzer) 解决方案: When not saving a line for undo because it was already done before, remember for which entry the last line must be computed. Added ue_getbot_entry pointer for this. When the number of lines changes, adjust the position of newer undo entries. 相关文件: src/structs.h, src/undo.c Patch 6.0.030 问题: Using ":source! file" doesn't work inside a loop or after ":argdo". (Pavol Juhas) 解决方案: Execute the commands in the file right away, do not let the main loop do it. 相关文件: src/ex_cmds2.c, src/ex_docmd.c, src/getchar.c, src/globals.h, src/proto/ex_docmd.pro, src/proto/getchar.pro Patch 6.0.031 问题: Nextstep doesn't have setenv() or putenv(). (John Beppu) 解决方案: Move putenv() from pty.c to misc2.c 相关文件: src/misc2.c, src/pty.c Patch 6.0.032 问题: When changing a setting that affects all folds, they are not displayed immediately. 解决方案: Set the redraw flag in foldUpdateAll(). 相关文件: src/fold.c Patch 6.0.033 问题: Using 'wildmenu' on MS-Windows, file names that include a space are only displayed starting with that space. (Xie Yuheng) 解决方案: Don't recognize a backslash before a space as a path separator. 相关文件: src/screen.c Patch 6.0.034 问题: Calling searchpair() with three arguments could result in a crash or strange error message. (Kalle Bjorklid) 解决方案: Don't use the fifth argument when there is no fourth argument. 相关文件: src/eval.c Patch 6.0.035 问题: The menu item Edit/Global_Settings/Toggle_Toolbar doesn't work when 'ignorecase' is set. (Allen Castaban) 解决方案: Always match case when checking if a flag is already present in 'guioptions'. 相关文件: runtime/menu.vim Patch 6.0.036 问题: OS/2, MS-DOS and MS-Windows: Using a path that starts with a slash in 'tags' doesn't work as expected. (Mathias Koehrer) 解决方案: Only use the drive, not the whole path to the current directory. Also make it work for "c:dir/file". 相关文件: src/misc2.c Patch 6.0.037 问题: When the user has set "did_install_syntax_menu" to avoid the default Syntax menu it still appears. (Virgilio) 解决方案: Don't add the three default items when "did_install_syntax_menu" is set. 相关文件: runtime/menu.vim Patch 6.0.038 问题: When 'selection' is "exclusive", deleting a block of text at the end of a line can leave the cursor beyond the end of the line. 解决方案: Correct the cursor position. 相关文件: src/ops.c Patch 6.0.039 问题: "gP" leaves the cursor in the wrong position when 'virtualedit' is used. Using "c" in blockwise Visual mode leaves the cursor in a strange position. 解决方案: For "gP" reset the "coladd" field for the '] mark. For "c" leave the cursor on the last inserted character. 相关文件: src/ops.c Patch 6.0.040 问题: When 'fileencoding' is invalid and writing fails because of this, the original file is gone. (Eric Carlier) 解决方案: Restore the original file from the backup. 相关文件: src/fileio.c Patch 6.0.041 问题: Using ":language messages en" when LC_MESSAGES is undefined results in setting LC_CTYPE. (Eric Carlier) 解决方案: Set $LC_MESSAGES instead. 相关文件: src/ex_cmds2.c Patch 6.0.042 问题: ":mksession" can't handle file names with a space. 解决方案: Escape special characters in file names with a backslash. 相关文件: src/ex_docmd.c Patch 6.0.043 问题: Patch 6.0.041 was wrong. 解决方案: Use mch_getenv() instead of vim_getenv(). 相关文件: src/ex_cmds2.c Patch 6.0.044 问题: Using a "containedin" list for a syntax item doesn't work for an item that doesn't have a "contains" argument. Also, "containedin" doesn't ignore a transparent item. (Timo Frenay) 解决方案: When there is a "containedin" argument somewhere, always check for contained items. Don't check for the transparent item but the item it's contained in. 相关文件: src/structs.h, src/syntax.c Patch 6.0.045 问题: After creating a fold with a Visual selection, another window with the same buffer still has inverted text. (Sami Salonen) 解决方案: Redraw the inverted text. 相关文件: src/normal.c Patch 6.0.046 问题: When getrlimit() returns an 8 byte number the check for running out of stack may fail. (Anthony Meijer) 解决方案: Skip the stack check if the limit doesn't fit in a long. 相关文件: src/auto/configure, src/config.h.in, src/configure.in, src/os_unix.c Patch 6.0.047 问题: Using a regexp with "\(\)" inside a "\%[]" item causes a crash. (Samuel Lacas) 解决方案: Don't allow nested atoms inside "\%[]". 相关文件: src/regexp.c Patch 6.0.048 问题: Win32: In the console the mouse doesn't always work correctly. Sometimes after getting focus a mouse movement is interpreted like a button click. 解决方案: Use a different function to obtain the number of mouse buttons. Avoid recognizing a button press from undefined bits. (Vince Negri) 相关文件: src/os_win32.c Patch 6.0.049 问题: When using evim the intro screen is misleading. (Adrian Nagle) 解决方案: Mention whether 'insertmode' is set and the menus to be used. 相关文件: runtime/menu.vim, src/version.c Patch 6.0.050 问题: UTF-8: "viw" doesn't include non-ASCII characters before the cursor. (Bertilo Wennergren) 解决方案: Use dec_cursor() instead of decrementing the column number. 相关文件: src/search.c Patch 6.0.051 问题: UTF-8: Using CTRL-R on the command line doesn't insert composing characters. (Ron Aaron) 解决方案: Also include the composing characters and fix redrawing them. 相关文件: src/ex_getln.c, src/ops.c Patch 6.0.052 问题: The check for rlim_t in patch 6.0.046 does not work on some systems. (Zdenek Sekera) 解决方案: Also look in sys/resource.h for rlim_t. 相关文件: src/auto/configure, src/configure.in Patch 6.0.053 (extra) 问题: Various problems with QNX. 解决方案: Minor fix for configure. Switch on terminal clipboard support in main.c. Fix "pterm" mouse support. os_qnx.c didn't build without photon. (Julian Kinraid) 相关文件: src/auto/configure, src/configure.in, src/gui_photon.c, src/main.c, src/misc2.c, src/option.h, src/os_qnx.c, src/os_qnx.h, src/syntax.c Patch 6.0.054 问题: When using mswin.vim, CTRL-V pastes a block of text like it is normal text. Using CTRL-V in blockwise Visual mode leaves "x" characters behind. 解决方案: Make CTRL-V work as it should. Do the same for the Paste menu entries. 相关文件: runtime/menu.vim, runtime/mswin.vim Patch 6.0.055 问题: GTK: The selection isn't copied the first time. 解决方案: Own the selection at the right moment. 相关文件: src/gui_gtk_x11.c Patch 6.0.056 问题: Using "CTRL-O cw" in Insert mode results in a nested Insert mode. <Esc> doesn't leave Insert mode then. 解决方案: Only use nested Insert mode when 'insertmode' is set or when a mapping is used. 相关文件: src/normal.c Patch 6.0.057 问题: Using ":wincmd g}" in a function doesn't work. (Gary Holloway) 解决方案: Execute the command directly, instead of putting it in the typeahead buffer. 相关文件: src/normal.c, src/proto/normal.pro, src/window.c Patch 6.0.058 问题: When a Cursorhold autocommand moved the cursor, the ruler wasn't updated. (Bohdan Vlasyuk) 解决方案: Update the ruler after executing the autocommands. 相关文件: src/gui.c Patch 6.0.059 问题: Highlighting for 'hlsearch' isn't visible in lines that are highlighted for diff highlighting. (Gary Holloway) 解决方案: Let 'hlsearch' highlighting overrule diff highlighting. 相关文件: src/screen.c Patch 6.0.060 问题: Motif: When the tooltip is to be popped up, Vim crashes. (Gary Holloway) 解决方案: Check for a NULL return value from gui_motif_fontset2fontlist(). 相关文件: src/gui_beval.c Patch 6.0.061 问题: The toolbar buttons to load and save a session do not correctly use v:this_session. 解决方案: Check for v:this_session to be empty instead of existing. 相关文件: runtime/menu.vim Patch 6.0.062 问题: Crash when 'verbose' is > 3 and using ":shell". (Yegappan Lakshmanan) 解决方案: Avoid giving a NULL pointer to printf(). Also output a newline and switch the cursor on. 相关文件: src/misc2.c Patch 6.0.063 问题: When 'cpoptions' includes "$", using "cw" to type a ')' on top of the "$" doesn't update syntax highlighting after it. 解决方案: Stop displaying the "$" when typing a ')' in its position. 相关文件: src/search.c Patch 6.0.064 (extra) 问题: The NSIS install script doesn't work with newer versions of NSIS. The diff feature doesn't work when there isn't a good diff.exe on the system. 解决方案: Replace the GetParentDir instruction by a user function. Fix a few cosmetic problems. Use defined constants for the version number, so that it's defined in one place only. Only accept the install directory when it ends in "vim". (Eduardo Fernandez) Add a diff.exe and use it from the default _vimrc. 相关文件: nsis/gvim.nsi, nsis/README.txt, src/dosinst.c Patch 6.0.065 问题: When using ":normal" in 'indentexpr' it may use redo characters before its argument. (Neil Bird) 解决方案: Save and restore the stuff buffer in ex_normal(). 相关文件: src/ex_docmd.c, src/getchar.c, src/globals.h, src/structs.h Patch 6.0.066 问题: Sometimes undo for one command is split into two undo actions. (Halim Salman) 解决方案: Don't set the undo-synced flag when reusing a line that was already saved for undo. 相关文件: src/undo.c Patch 6.0.067 问题: if_xcmdsrv.c doesn't compile on systems where fd_set isn't defined in the usual header file (e.g., AIX). (Mark Waggoner) 解决方案: Include sys/select.h in if_xcmdsrv.c for systems that have it. 相关文件: src/if_xcmdsrv.c Patch 6.0.068 问题: When formatting a Visually selected area with "gq" and the number of lines increases the last line may not be redrawn correctly. (Yegappan Lakshmanan) 解决方案: Correct the area to be redrawn for inserted/deleted lines. 相关文件: src/ops.c Patch 6.0.069 问题: Using "K" on a word that includes a "!" causes a "No previous command" error, because the "!" is expanded. (Craig Jeffries) 解决方案: Put a backslash before the "!". 相关文件: src/normal.c Patch 6.0.070 问题: Win32: The error message for a failed dynamic linking of a Perl, Ruby, Tcl and Python library is unclear about what went wrong. 解决方案: Give the name of the library or function that could not be loaded. Also for the iconv and gettext libraries when 'verbose' is set. 相关文件: src/eval.c, src/if_perl.xs, src/if_python.c, src/if_ruby.c, src/if_tcl.c, src/mbyte.c, src/os_win32.c, src/proto/if_perl.pro, src/proto/if_python.pro, src/proto/if_ruby.pro, src/proto/if_tcl.pro, src/proto/mbyte.pro Patch 6.0.071 问题: The "iris-ansi" builtin termcap isn't very good. 解决方案: Fix the wrong entries. (David Harrison) 相关文件: src/term.c Patch 6.0.072 问题: When 'lazyredraw' is set, a mapping that stops Visual mode, moves the cursor and starts Visual mode again causes a redraw problem. (Brian Silverman) 解决方案: Redraw both the old and the new Visual area when necessary. 相关文件: src/normal.c, src/screen.c Patch 6.0.073 (extra) 问题: DJGPP: When using CTRL-Z to start a shell, the prompt is halfway the text. (Volker Kiefel) 解决方案: Position the system cursor before starting the shell. 相关文件: src/os_msdos.c Patch 6.0.074 问题: When using "&" in a substitute string a multibyte character with a trailbyte 0x5c is not handled correctly. 解决方案: Recognize multibyte characters inside the "&" part. (Muraoka Taro) 相关文件: src/regexp.c Patch 6.0.075 问题: When closing a horizontally split window while 'eadirection' is "hor" another horizontally split window is still resized. (Aron Griffis) 解决方案: Only resize windows in the same top frame as the window that is split or closed. 相关文件: src/main.c, src/proto/window.pro, src/window.c Patch 6.0.076 问题: Warning for wrong pointer type when compiling. 解决方案: Use char instead of char_u pointer. 相关文件: src/version.c Patch 6.0.077 问题: Patch 6.0.075 was incomplete. 解决方案: Fix another call to win_equal(). 相关文件: src/option.c Patch 6.0.078 问题: Using "daw" at the end of a line on a single-character word didn't include the white space before it. At the end of the file it didn't work at all. (Gavin Sinclair) 解决方案: Include the white space before the word. 相关文件: src/search.c Patch 6.0.079 问题: When "W" is in 'cpoptions' and 'backupcopy' is "no" or "auto", can still overwrite a read-only file, because it's renamed. (Gary Holloway) 解决方案: Add a check for a read-only file before renaming the file to become the backup. 相关文件: src/fileio.c Patch 6.0.080 问题: When using a session file that has the same file in two windows, the fileinfo() call in do_ecmd() causes a scroll and a hit-enter prompt. (Robert Webb) 解决方案: Don't scroll this message when 'shortmess' contains 'O'. 相关文件: src/ex_cmds.c Patch 6.0.081 问题: After using ":saveas" the new buffer name is added to the Buffers menu with a wrong number. (Chauk-Mean Proum) 解决方案: Trigger BufFilePre and BufFilePost events for the renamed buffer and BufAdd for the old name (which is with a new buffer). 相关文件: src/ex_cmds.c Patch 6.0.082 问题: When swapping screens in an xterm and there is an (error) message from the vimrc script, the shell prompt is after the message. 解决方案: Output a newline when there was output on the alternate screen. Also when starting the GUI. 相关文件: src/main.c Patch 6.0.083 问题: GTK: When compiled without menu support the buttons in a dialog don't have any text. (Erik Edelmann) 解决方案: Add the text also when GTK_USE_ACCEL isn't defined. And define GTK_USE_ACCEL also when not using menus. 相关文件: src/gui_gtk.c Patch 6.0.084 问题: UTF-8: a "r" command with an argument that is a keymap for a character with a composing character can't be repeated with ".". (Raphael Finkel) 解决方案: Add the composing characters to the redo buffer. 相关文件: src/normal.c Patch 6.0.085 问题: When 'mousefocus' is set, using "s" to go to Insert mode and then moving the mouse pointer to another window stops Insert mode, while this doesn't happen with "a" or "i". (Robert Webb) 解决方案: Reset finish_op before calling edit(). 相关文件: src/normal.c Patch 6.0.086 问题: When using "gu" the message says "~ed". 解决方案: Make the message say "changed". 相关文件: src/ops.c Patch 6.0.087 (lang) 问题: Message translations are incorrect, which may cause a crash. (Peter Figura) The Turkish translations needed more work and the maintainer didn't have time. 解决方案: Fix order of printf arguments. Remove %2$d constructs. Add "-v" to msgfmt to get a warning for wrong translations. Don't install the Turkish translations for now. Update a few more translations. 相关文件: src/po/Makefile, src/po/af.po, src/po/cs.po, src/po/cs.cp1250.po, src/po/de.po, src/po/es.po, src/po/fr.po, src/po/it.po, src/po/ja.po, src/po/ja.sjis.po, src/po/ko.po, src/po/pl.po, src/po/sk.po, src/po/uk.po, src/po/zh_CN.UTF-8.po, src/po/zh_CN.cp936.po, src/po/zh_CN.po, src/po/zh_TW.po Patch 6.0.088 问题: "." doesn't work after using "rx" in Visual mode. (Charles Campbell) 解决方案: Also store the replacement character in the redo buffer. 相关文件: src/normal.c Patch 6.0.089 问题: In a C file, using "==" to align a line starting with "* " after a line with "* -" indents one space too few. (Piet Delport) 解决方案: Align with the previous line if the comment-start-string matches there. 相关文件: src/misc1.c Patch 6.0.090 问题: When a wrapping line does not fit in a window and 'scrolloff' is bigger than half the window height, moving the cursor left or right causes the screen to flash badly. (Lubomir Host) 解决方案: When there is not enough room to show 'scrolloff' screen lines and near the end of the line, show the end of the line. 相关文件: src/move.c Patch 6.0.091 问题: Using CTRL-O in Insert mode, while 'virtualedit' is "all" and the cursor is after the end-of-line, moves the cursor left. (Yegappan Lakshmanan) 解决方案: Keep the cursor in the same position. 相关文件: src/edit.c Patch 6.0.092 问题: The explorer plugin doesn't ignore case of 'suffixes' on MS-Windows. (Mike Williams) 解决方案: Match or ignore case as appropriate for the OS. 相关文件: runtime/plugin/explorer.vim Patch 6.0.093 问题: When the Tcl library couldn't be loaded dynamically, get an error message when closing a buffer or window. (Muraoka Taro) 解决方案: Only free structures if already using the Tcl interpreter. 相关文件: src/if_tcl.c Patch 6.0.094 问题: Athena: When clicking in the horizontal scrollbar Vim crashes. (Paul Ackersviller) 解决方案: Use the thumb size instead of the window pointer of the scrollbar (which is NULL). (David Harrison) Also avoid that scrolling goes the wrong way in a narrow window. 相关文件: src/gui_athena.c Patch 6.0.095 问题: Perl: Deleting lines may leave the cursor beyond the end of the file. 解决方案: Check the cursor position after deleting a line. (Serguei) 相关文件: src/if_perl.xs Patch 6.0.096 问题: When ":saveas fname" fails because the file already exists, the file name is changed anyway and a following ":w" will overwrite the file. (Eric Carlier) 解决方案: Don't change the file name if the file already exists. 相关文件: src/ex_cmds.c Patch 6.0.097 问题: Re-indenting in Insert mode with CTRL-F may cause a crash with a multibyte encoding. 解决方案: Avoid using a character before the start of a line. (Sergey Vlasov) 相关文件: src/edit.c Patch 6.0.098 问题: GTK: When using Gnome the "Search" and "Search and Replace" dialog boxes are not translated. 解决方案: Define ENABLE_NLS before including gnome.h. (Eduardo Fernandez) 相关文件: src/gui_gtk.c, src/gui_gtk_x11.c Patch 6.0.099 问题: Cygwin: When running Vi compatible MS-DOS line endings cause trouble. 解决方案: Make the default for 'fileformats' "unix,dos" in Vi compatible mode. (Michael Schaap) 相关文件: src/option.h Patch 6.0.100 问题: ":badd +0 test%file" causes a crash. 解决方案: Take into account that the "+0" is NUL terminated when allocating room for replacing the "%". 相关文件: src/ex_docmd.c Patch 6.0.101 问题: ":mksession" doesn't restore editing a file that has a '#' or '%' in its name. (Wolfgang Blankenburg) 解决方案: Put a backslash before the '#' and '%'. 相关文件: src/ex_docmd.c Patch 6.0.102 问题: When changing folds the cursor may appear halfway a closed fold. (Nam SungHyun) 解决方案: Set w_cline_folded correctly. (Yasuhiro Matsumoto) 相关文件: src/move.c Patch 6.0.103 问题: When using 'scrollbind' a large value of 'scrolloff' will make the scroll binding stop near the end of the file. (Coen Engelbarts) 解决方案: Don't use 'scrolloff' when limiting the topline for scroll binding. (Dany StAmant) 相关文件: src/normal.c Patch 6.0.104 问题: Multi-byte: When '$' is in 'cpoptions', typing a double-wide character that overwrites the left half of an old double-wide character causes a redraw problem and the cursor stops blinking. 解决方案: Clear the right half of the old character. (Yasuhiro Matsumoto) 相关文件: src/edit.c, src/screen.c Patch 6.0.105 问题: Multi-byte: In a window of one column wide, with syntax highlighting enabled a crash might happen. 解决方案: Skip getting the syntax attribute when the character doesn't fit anyway. (Yasuhiro Matsumoto) 相关文件: src/screen.c Patch 6.0.106 (extra) 问题: Win32: When the printer font is wrong, there is no error message. 解决方案: Give an appropriate error message. (Yasuhiro Matsumoto) 相关文件: src/os_mswin.c Patch 6.0.107 (extra) 问题: VisVim: When editing another file, a modified file may be written unexpectedly and without warning. 解决方案: Split the window if a file was modified. 相关文件: VisVim/Commands.cpp Patch 6.0.108 问题: When using folding could try displaying line zero, resulting in an error for a NULL pointer. 解决方案: Stop decrementing w_topline when the first line of a window is in a closed fold. 相关文件: src/window.c Patch 6.0.109 问题: XIM: When the input method is enabled, repeating an insertion with "." disables it. (Marcel Svitalsky) 解决方案: Don't store the input method status when a command comes from the stuff buffer. 相关文件: src/ui.c Patch 6.0.110 问题: Using undo after executing "OxjAxkdd" from a register in an empty buffer gives an error message. (Gerhard Hochholzer) 解决方案: Don't adjust the bottom line number of an undo block when it's zero. Add a test for this problem. 相关文件: src/undo.c, src/testdir/test20.in, src/testdir/test20.ok Patch 6.0.111 问题: The virtcol() function doesn't take care of 'virtualedit'. 解决方案: Add the column offset when needed. (Yegappan Lakshmanan) 相关文件: src/eval.c Patch 6.0.112 问题: The explorer plugin doesn't sort directories with a space or special character after a directory with a shorter name. 解决方案: Ignore the trailing slash when comparing directory names. (Mike Williams) 相关文件: runtime/plugin/explorer.vim Patch 6.0.113 问题: ":edit ~/fname" doesn't work if $HOME includes a space. Also, expanding wildcards with the shell may fail. (John Daniel) 解决方案: Escape spaces with a backslash when needed. 相关文件: src/ex_docmd.c, src/misc1.c, src/proto/misc1.pro, src/os_unix.c Patch 6.0.114 问题: Using ":p" with fnamemodify() didn't expand "~/" or "~user/" to a full path. For Win32 the current directory was prepended. (Michael Geddes) 解决方案: Expand the home directory. 相关文件: src/eval.c Patch 6.0.115 (extra) 问题: Win32: When using a dialog with a textfield it cannot scroll the text. 解决方案: Add ES_AUTOHSCROLL to the textfield style. (Pedro Gomes) 相关文件: src/gui_w32.c Patch 6.0.116 (extra) 问题: MS-Windows NT/2000/XP: filewritable() doesn't work correctly for filesystems that use ACLs. 解决方案: Use ACL functions to check if a file is writable. (Mike Williams) 相关文件: src/eval.c, src/macros.h, src/os_win32.c, src/proto/os_win32.pro Patch 6.0.117 (extra) 问题: Win32: when disabling the menu, "set lines=999" doesn't use all the available screen space. 解决方案: Don't subtract the fixed caption height but the real menu height from the available screen space. Also: Avoid recursion in gui_mswin_get_menu_height(). 相关文件: src/gui_w32.c, src/gui_w48.c Patch 6.0.118 问题: When $TMPDIR is a relative path, the temp directory is missing a trailing slash and isn't deleted when Vim exits. (Peter Holm) 解决方案: Add the slash after expanding the directory to an absolute path. 相关文件: src/fileio.c Patch 6.0.119 (depends on patch 6.0.116) 问题: VMS: filewritable() doesn't work properly. 解决方案: Use the same method as for Unix. (Zoltan Arpadffy) 相关文件: src/eval.c Patch 6.0.120 问题: The conversion to html isn't compatible with XHTML. 解决方案: Quote the values. (Jess Thrysoee) 相关文件: runtime/syntax/2html.vim Patch 6.0.121 (extra) (depends on patch 6.0.116) 问题: Win32: After patch 6.0.116 Vim doesn't compile with mingw32. 解决方案: Add an #ifdef HAVE_ACL. 相关文件: src/os_win32.c Patch 6.0.122 (extra) 问题: Win16: Same resize problems as patch 6.0.117 fixed for Win32. And dialog textfield problem from patch 6.0.115. 解决方案: Set old_menu_height only when used. Add ES_AUTOHSCROLL flag. (Vince Negri) 相关文件: src/gui_w16.c Patch 6.0.123 (depends on patch 6.0.119) 问题: Win16: Compilation problems. 解决方案: Move "&&" to other lines. (Vince Negri) 相关文件: src/eval.c Patch 6.0.124 问题: When using a ":substitute" command that starts with "\=" (evaluated as an expression), "~" was still replaced with the previous substitute string. 解决方案: Skip the replacement when the substitute string starts with "\=". Also adjust the documentation about doubling backslashes. 相关文件: src/ex_cmds.c, runtime/doc/change.txt Patch 6.0.125 (extra) 问题: Win32: When using the multi_byte_ime feature pressing the shift key would be handled as if a character was entered, thus mappings with a shifted key didn't work. (Charles Campbell) 解决方案: Ignore pressing the shift, control and alt keys. 相关文件: src/os_win32.c Patch 6.0.126 问题: The python library was always statically linked. 解决方案: Link the python library dynamically. (Matthias Klose) 相关文件: src/auto/configure, src/configure.in Patch 6.0.127 问题: When using a terminal that swaps screens and the Normal background color has a different background, using an external command may cause the color of the wrong screen to be changed. (Mark Waggoner) 解决方案: Don't call screen_stop_highlight() in stoptermcap(). 相关文件: src/term.c Patch 6.0.128 问题: When moving a vertically split window to the far left or right, the scrollbars are not adjusted. (Scott E Lee) When 'mousefocus' is set the mouse pointer wasn't adjusted. 解决方案: Adjust the scrollbars and the mouse pointer. 相关文件: src/window.c Patch 6.0.129 问题: When using a very long file name, ":ls" (repeated a few times) causes a crash. Test with "vim `perl -e 'print "A"x1000'`". (Tejeda) 解决方案: Terminate a string before getting its length in buflist_list(). 相关文件: src/buffer.c Patch 6.0.130 问题: When using ":cprev" while the error window is open, and the new line at the top wraps, the window isn't correctly drawn. (Yegappan Lakshmanan) 解决方案: When redrawing the topline don't scroll twice. 相关文件: src/screen.c Patch 6.0.131 问题: When using bufname() and there are two matches for listed buffers and one match for an unlisted buffer, the unlisted buffer is used. (Aric Blumer) 解决方案: When there is a match with a listed buffer, don't check for unlisted buffers. 相关文件: src/buffer.c Patch 6.0.132 问题: When setting 'iminsert' in the vimrc and using an xterm with two screens the ruler is drawn in the wrong screen. (Igor Goldenberg) 解决方案: Only draw the ruler when using the right screen. 相关文件: src/option.c Patch 6.0.133 问题: When opening another buffer while 'keymap' is set and 'iminsert' is zero, 'iminsert' is set to one unexpectedly. (Igor Goldenberg) 解决方案: Don't set 'iminsert' as a side effect of defining a ":lmap" mapping. Only do that when 'keymap' is set. 相关文件: src/getchar.c, src/option.c Patch 6.0.134 问题: When completing ":set tags=" a path with an embedded space causes the completion to stop. (Sektor van Skijlen) 解决方案: Escape spaces with backslashes, like for ":set path=". Also take backslashes into account when searching for the start of the path to complete (e.g., for 'backupdir' and 'cscopeprg'). 相关文件: src/ex_docmd.c, src/ex_getln.c, src/option.c, src/structs.h Patch 6.0.135 问题: Menus that are not supposed to do anything used "<Nul>", which still produced an error beep. When CTRL-O is mapped for Insert mode, ":amenu" commands didn't work in Insert mode. Menu language falls back to English when $LANG ends in "@euro". 解决方案: Use "<Nop>" for a menu item that doesn't do anything, just like mappings. Use ":anoremenu" instead of ":amenu". Ignore "@euro" in the locale name. 相关文件: runtime/makemenu.vim, runtime/menu.vim, src/menu.c Patch 6.0.136 问题: When completing in Insert mode, a mapping could be unexpectedly applied. 解决方案: Don't use mappings when checking for a typed character. 相关文件: src/edit.c Patch 6.0.137 问题: GUI: When using the find or find/replace dialog from Insert mode, the input mode is stopped. 解决方案: Don't use the input method status when the main window doesn't have focus. 相关文件: src/ui.c Patch 6.0.138 问题: GUI: When using the find or find/replace dialog from Insert mode, the text is inserted when CTRL-O is mapped. (Andre Pang) When opening the dialog again, a whole word search isn't recognized. When doing "replace all" a whole word search was never done. 解决方案: Don't put a search or replace command in the input buffer, execute it directly. Recognize "\<" and "\>" after removing "\V". Add "\<" and "\>" also for "replace all". 相关文件: src/gui.c Patch 6.0.139 问题: When stopping 'wildmenu' completion, the statusline of the bottom-left vertically split window isn't redrawn. (Yegappan Lakshmanan) 解决方案: Redraw all the bottom statuslines. 相关文件: src/ex_getln.c, src/proto/screen.pro, src/screen.c Patch 6.0.140 问题: Memory allocated for local mappings and abbreviations is leaked when the buffer is wiped out. 解决方案: Clear the local mappings when deleting a buffer. 相关文件: src/buffer.c, src/getchar.c, src/proto/getchar.pro, src/vim.h Patch 6.0.141 问题: When using ":enew" in an empty buffer, some buffer-local things are not cleared. b:keymap_name is not set. 解决方案: Clear user commands and mappings local to the buffer when re-using the current buffer. Reload the keymap. 相关文件: src/buffer.c Patch 6.0.142 问题: When Python is linked statically, loading dynamic extensions might fail. 解决方案: Add an extra linking flag when needed. (Andrew Rodionoff) 相关文件: src/configure.in, src/auto/configure Patch 6.0.143 问题: When a syntax item includes a line break in a pattern, the syntax may not be updated properly when making a change. 解决方案: Add the "linebreaks" argument to ":syn sync". 相关文件: runtime/doc/syntax.txt, src/screen.c, src/structs.h, src/syntax.c Patch 6.0.144 问题: After patch 6.0.088 redoing "veU" doesn't work. 解决方案: Don't add the "U" to the redo buffer, it will be used as an undo command. 相关文件: src/normal.c Patch 6.0.145 问题: When Vim can't read any input it might get stuck. When redirecting stdin and stderr Vim would not read commands from a file. (Servatius Brandt) 解决方案: When repeatedly trying to read a character when it's not possible, exit Vim. When stdin and stderr are not a tty, still try reading from them, but don't do a blocking wait. 相关文件: src/ui.c Patch 6.0.146 问题: When 'statusline' contains "%{'-'}" this results in a zero. (Milan Vancura) 解决方案: Don't handle numbers with a minus as a number, they were not displayed anyway. 相关文件: src/buffer.c Patch 6.0.147 问题: It's not easy to mark a Vim version as being modified. The new license requires this. 解决方案: Add the --modified-by argument to configure and the MODIFIED_BY define. It's used in the intro screen and the ":version" output. 相关文件: src/auto/configure, src/configure.in, src/config.h.in, src/feature.h, src/version.c Patch 6.0.148 问题: After "p" in an empty line, `[ goes to the second character. (Kontra Gergely) 解决方案: Don't increment the column number in an empty line. 相关文件: src/ops.c Patch 6.0.149 问题: The pattern "\(.\{-}\)*" causes a hang. When using a search pattern that causes a stack overflow to be detected Vim could still hang. 解决方案: Correctly report "operand could be empty" when using "\{-}". Check for "out_of_stack" inside loops to avoid a hang. 相关文件: src/regexp.c Patch 6.0.150 问题: When using a multibyte encoding, patch 6.0.148 causes "p" to work like "P". (Sung-Hyun Nam) 解决方案: Compute the byte length of a multibyte character. 相关文件: src/ops.c Patch 6.0.151 问题: Redrawing the status line and ruler can be wrong when it contains multibyte characters. 解决方案: Use character width and byte length correctly. (Yasuhiro Matsumoto) 相关文件: src/screen.c Patch 6.0.152 问题: strtrans() could hang on an illegal UTF-8 byte sequence. 解决方案: Skip over illegal bytes. (Yasuhiro Matsumoto) 相关文件: src/charset.c Patch 6.0.153 问题: When using (illegal) double-byte characters and Vim syntax highlighting Vim can crash. (Yasuhiro Matsumoto) 解决方案: Increase a pointer over a character instead of a byte. 相关文件: src/regexp.c Patch 6.0.154 问题: MS-DOS and MS-Windows: The menu entries for xxd don't work when there is no xxd in the path. When converting back from Hex the filetype may remain "xxd" if it is not detected. 解决方案: When xxd is not in the path use the one in the runtime directory, where the install program has put it. Clear the 'filetype' option before detecting the new value. 相关文件: runtime/menu.vim Patch 6.0.155 问题: Mac: compilation problems in ui.c after patch 6.0.145. (Axel Kielhorn) 解决方案: Don't call mch_inchar() when NO_CONSOLE is defined. 相关文件: src/ui.c Patch 6.0.156 问题: Starting Vim with the -b argument and two files, ":next" doesn't set 'binary' in the second file, like Vim 5.7. (Norman Diamond) 解决方案: Set the global value for 'binary'. 相关文件: src/option.c Patch 6.0.157 问题: When defining a user command with "-complete=dir" files will also be expanded. Also, "-complete=mapping" doesn't appear to work. (Michael Naumann) 解决方案: Use the expansion flags defined with the user command. Handle expanding mappings specifically. 相关文件: src/ex_docmd.c Patch 6.0.158 问题: When getting the warning for a file being changed outside of Vim and reloading the file, the 'readonly' option is reset, even when the permissions didn't change. (Marcel Svitalsky) 解决方案: Keep 'readonly' set when reloading a file and the permissions didn't change. 相关文件: src/fileio.c Patch 6.0.159 问题: Wildcard expansion for ":emenu" also shows separators. 解决方案: Skip menu separators for ":emenu", ":popup" and ":tearoff". Also, don't handle ":tmenu" as if it was ":tearoff". And leave out the alternatives with "&" included. 相关文件: src/menu.c Patch 6.0.160 问题: When compiling with GCC 3.0.2 and using the "-O2" argument, the optimizer causes a problem that makes Vim crash. 解决方案: Add a configure check to avoid "-O2" for this version of gcc. 相关文件: src/configure.in, src/auto/configure Patch 6.0.161 (extra) 问题: Win32: Bitmaps don't work with signs. 解决方案: Make it possible to use bitmaps with signs. (Muraoka Taro) 相关文件: src/ex_cmds.c, src/feature.h, src/gui_w32.c, src/gui_x11.c, src/proto/gui_w32.pro, src/proto/gui_x11.pro Patch 6.0.162 问题: Client-server: An error message for a wrong expression appears in the server instead of the client. 解决方案: Pass the error message from the server to the client. Also adjust the example code. (Flemming Madsen) 相关文件: src/globals.h, src/if_xcmdsrv.c, src/main.c, src/os_mswin.c, src/proto/if_xcmdsrv.pro, src/proto/os_mswin.pro, runtime/doc/eval.txt, runtime/tools/xcmdsrv_client.c Patch 6.0.163 问题: When using a GUI dialog, a file name is sometimes used like it was a directory. 解决方案: Separate path and file name properly. For GTK, Motif and Athena concatenate directory and file name for the default selection. 相关文件: src/diff.c, src/ex_cmds.c, src/ex_cmds2.c, src/ex_docmd.c, src/gui_athena.c, src/gui_gtk.c, src/gui_motif.c, src/message.c Patch 6.0.164 问题: After patch 6.0.135 the menu entries for pasting don't work in Insert and Visual mode. (Muraoka Taro) 解决方案: Add <script> to allow script-local mappings. 相关文件: runtime/menu.vim Patch 6.0.165 问题: Using --remote and executing locally gives unavoidable error messages. 解决方案: Add --remote-silent and --remote-wait-silent to silently execute locally. For Win32 there was no error message when a server didn't exist. 相关文件: src/eval.c, src/if_xcmdsrv.c, src/main.c, src/os_mswin.c, src/proto/if_xcmdsrv.pro, src/proto/os_mswin.pro Patch 6.0.166 问题: GUI: There is no way to avoid dialogs to pop up. 解决方案: Add the 'c' flag to 'guioptions': Use console dialogs. (Yegappan Lakshmanan) 相关文件: runtime/doc/options.txt, src/option.h, src/message.c Patch 6.0.167 问题: When 'fileencodings' is "latin2" some characters in the help files are displayed wrong. 解决方案: Force the 'fileencoding' for the help files to be "latin1". 相关文件: src/fileio.c Patch 6.0.168 问题: ":%s/\n/#/" doesn't replace at an empty line. (Bruce DeVisser) 解决方案: Don't skip matches after joining two lines. 相关文件: src/ex_cmds.c Patch 6.0.169 问题: When run as evim and the GUI can't be started we get stuck in a terminal without menus in Insert mode. 解决方案: Exit when using "evim" and "gvim -y" when the GUI can't be started. 相关文件: src/main.c Patch 6.0.170 问题: When printing double-width characters the size of tabs after them is wrong. (Muraoka Taro) 解决方案: Correctly compute the column after a double-width character. 相关文件: src/ex_cmds2.c Patch 6.0.171 问题: With 'keymodel' including "startsel", in Insert mode after the end of a line, shift-Left does not move the cursor. (Steve Hall) 解决方案: CTRL-O doesn't move the cursor left, need to do that explicitly. 相关文件: src/edit.c Patch 6.0.172 问题: CTRL-Q doesn't replace CTRL-V after CTRL-X in Insert mode while it does in most other situations. 解决方案: Make CTRL-X CTRL-Q work like CTRL-X CTRL-V in Insert mode. 相关文件: src/edit.c Patch 6.0.173 问题: When using "P" to insert a line break the cursor remains past the end of the line. 解决方案: Check for the cursor being beyond the end of the line. 相关文件: src/ops.c Patch 6.0.174 问题: After using "gd" or "gD" the search direction for "n" may still be backwards. (Servatius Brandt) 解决方案: Reset the search direction to forward. 相关文件: src/normal.c, src/search.c, src/proto/search.pro Patch 6.0.175 问题: ":help /\z(\)" doesn't work. (Thomas Koehler) 解决方案: Double the backslashes. 相关文件: src/ex_cmds.c Patch 6.0.176 问题: When killed by a signal autocommands are still triggered as if nothing happened. 解决方案: Add the v:dying variable to allow autocommands to work differently when a deadly signal has been trapped. 相关文件: src/eval.c, src/os_unix.c, src/vim.h Patch 6.0.177 问题: When 'commentstring' is empty and 'foldmethod' is "marker", "zf" doesn't work. (Thomas S. Urban) 解决方案: Add the marker even when 'commentstring' is empty. 相关文件: src/fold.c, src/normal.c Patch 6.0.178 问题: Uninitialized memory read from xp_backslash field. 解决方案: Initialize xp_backslash field properly. 相关文件: src/eval.c, src/ex_docmd.c, src/ex_getln.c, src/misc1.c, src/tag.c Patch 6.0.179 问题: Win32: When displaying UTF-8 characters may read uninitialized memory. 解决方案: Add utfc_ptr2len_check_len() to avoid reading past the end of a string. 相关文件: src/mbyte.c, src/proto/mbyte.pro, src/gui_w32.c Patch 6.0.180 问题: Expanding environment variables in a string that ends in a backslash could go past the end of the string. 解决方案: Detect the trailing backslash. 相关文件: src/misc1.c Patch 6.0.181 问题: When using ":cd dir" memory was leaked. 解决方案: Free the allocated memory. Also avoid an uninitialized memory read. 相关文件: src/misc2.c Patch 6.0.182 问题: When using a regexp on multibyte characters, could try to read a character before the start of the line. 解决方案: Don't decrement a pointer to before the start of the line. 相关文件: src/regexp.c Patch 6.0.183 问题: Leaking memory when ":func!" redefines a function. 解决方案: Free the function name when it's not used. 相关文件: src/eval.c Patch 6.0.184 问题: Leaking memory when expanding option values. 解决方案: Don't always copy the expanded option into allocated memory. 相关文件: src/option.c Patch 6.0.185 问题: Crash in Vim when pasting a selection in another application, on a 64 bit machine. 解决方案: Fix the format for an Atom to 32 bits. (Peter Derr) 相关文件: src/ui.c Patch 6.0.186 问题: X11: Three warnings when compiling the client-server code. 解决方案: Add a typecast to unsigned char. 相关文件: src/if_xcmdsrv.c Patch 6.0.187 问题: "I" in Visual mode and then "u" reports too many changes. (Andrew Stryker) "I" in Visual linewise mode adjusts the indent for no apparent reason. 解决方案: Only save those lines for undo that are changed. Don't change the indent after inserting in Visual linewise mode. 相关文件: src/ops.c Patch 6.0.188 问题: Win32: After patch 6.0.161 signs defined in the vimrc file don't work. 解决方案: Initialize the sign icons after initializing the GUI. (Vince Negri) 相关文件: src/gui.c, src/gui_x11.c Patch 6.0.189 问题: The size of the Visual area isn't always displayed when scrolling ('ruler' off, 'showcmd' on). Also not when using a search command. (Sylvain Hitier) 解决方案: Redisplay the size of the selection after showing the mode. 相关文件: src/screen.c Patch 6.0.190 问题: GUI: when 'mouse' is empty a click with the middle button still moves the cursor. 解决方案: Paste at the cursor position instead of the mouse position. 相关文件: src/normal.c Patch 6.0.191 问题: When no servers are available serverlist() gives an error instead of returning an empty string. (Hari Krishna) 解决方案: Don't give an error message. 相关文件: src/eval.c Patch 6.0.192 问题: When 'virtualedit' is set, "ylj" goes to the wrong column. (Andrew Nikitin) 解决方案: Reset the flag that w_virtcol is valid when moving the cursor back to the start of the operated area. 相关文件: src/normal.c Patch 6.0.193 问题: When 'virtualedit' is set, col(".") after the end of the line should return one extra. 解决方案: Add one to the column. 相关文件: src/eval.c Patch 6.0.194 问题: "--remote-silent" tries to send a reply to the client, like it was "--remote-wait". 解决方案: Properly check for the argument. 相关文件: src/main.c Patch 6.0.195 问题: When 'virtualedit' is set and a search starts in virtual space ":call search('x')" goes to the wrong position. (Eric Long) 解决方案: Reset coladd when finding a match. 相关文件: src/search.c Patch 6.0.196 问题: When 'virtualedit' is set, 'selection' is "exclusive" and visually selecting part of a tab at the start of a line, "x" joins it with the previous line. Also, when the selection spans more than one line the whole tab is deleted. 解决方案: Take coladd into account when adjusting for 'selection' being "exclusive". Also expand a tab into spaces when deleting more than one line. 相关文件: src/normal.c, src/ops.c Patch 6.0.197 问题: When 'virtualedit' is set and 'selection' is "exclusive", "v$x" doesn't delete the last character in the line. (Eric Long) 解决方案: Don't reset the inclusive flag. (Helmut Stiegler) 相关文件: src/normal.c Patch 6.0.198 问题: When 'virtualedit' is set and 'showbreak' is not empty, moving the cursor over the line break doesn't work properly. (Eric Long) 解决方案: Make getviscol() and getviscol2() use getvvcol() to obtain the virtual cursor position. Adjust coladvance() and oneleft() to skip over the 'showbreak' characters. 相关文件: src/edit.c, src/misc2.c Patch 6.0.199 问题: Multi-byte: could use iconv() after calling iconv_end(). (Yasuhiro Matsumoto) 解决方案: Stop converting input and output stream after calling iconv_end(). 相关文件: src/mbyte.c Patch 6.0.200 问题: A script that starts with "#!perl" isn't recognized as a Perl filetype. 解决方案: Ignore a missing path in a script header. Also, speed up recognizing scripts by simplifying the patterns used. 相关文件: runtime/scripts.vim Patch 6.0.201 问题: When scrollbinding and doing a long jump, switching windows jumps to another position in the file. Scrolling a few lines at a time is OK. (Johannes Zellner) 解决方案: When setting w_topline reset the flag that indicates w_botline is valid. 相关文件: src/diff.c Patch 6.0.202 问题: The "icon=" argument for the menu command to define a toolbar icon with a file didn't work for GTK. (Christian J. Robinson) For Motif and Athena a full path was required. 解决方案: Search the icon file using the specified path. Expand environment variables in the file name. 相关文件: src/gui_gtk.c, src/gui_x11.c Patch 6.0.203 问题: Can change 'fileformat' even though 'modifiable' is off. (Servatius Brandt) 解决方案: Correct check for kind of set command. 相关文件: src/option.c Patch 6.0.204 问题: ":unlet" doesn't work for variables with curly braces. (Thomas Scott Urban) 解决方案: Handle variable names with curly braces properly. (Vince Negri) 相关文件: src/eval.c Patch 6.0.205 (extra) 问题: "gvim -f" still forks when using the batch script to start Vim. 解决方案: Add an argument to "start" to use a foreground session (Michael Geddes) 相关文件: src/dosinst.c Patch 6.0.206 问题: Unix: if expanding a wildcard in a file name results in a wildcard character and there are more parts in the path with a wildcard, it is expanded again. Windows: ":edit \[abc]" could never edit the file "[abc]". 解决方案: Don't expand wildcards in already expanded parts. Don't remove backslashes used to escape the special meaning of a wildcard; can edit "[abc]" if '[' is removed from 'isfname'. 相关文件: src/misc1.c, src/os_unix.c Patch 6.0.207 (extra) 问题: Win32: The shortcuts and start menu entries let Vim startup in the desktop directory, which is not very useful. 解决方案: Let shortcuts start Vim in $HOME or $HOMEDIR$HOMEPATH. 相关文件: src/dosinst.c Patch 6.0.208 问题: GUI: When using a keymap and the cursor is not blinking, CTRL-^ in Insert mode doesn't directly change the cursor color. (Alex Solow) 解决方案: Force a redraw of the cursor after CTRL-^. 相关文件: src/edit.c Patch 6.0.209 问题: GUI GTK: After selecting a 'guifont' with the font dialog there are redraw problems for multibyte characters. 解决方案: Separate the font dialog from setting the new font name to avoid that "*" is used to find wide and bold fonts. When redrawing extra characters for the bold trick, take care of UTF-8 characters. 相关文件: src/gui.c, src/gui_gtk_x11.c, src/option.c, src/proto/gui.pro, src/proto/gui_gtk_x11.pro Patch 6.0.210 问题: After patch 6.0.167 it's no longer possible to edit a help file in another encoding than latin1. 解决方案: Let the "++enc=" argument overrule the encoding. 相关文件: src/fileio.c Patch 6.0.211 问题: When reading a file fails, the buffer is empty, but it might still be possible to write it with ":w" later. The original file is lost then. (Steve Amerige) 解决方案: Set the 'readonly' option for the buffer. 相关文件: src/fileio.c Patch 6.0.212 问题: GUI GTK: confirm("foo", "") causes a crash. 解决方案: Don't make a non-existing button the default. Add a default "OK" button if none is specified. 相关文件: src/eval.c, src/gui_gtk.c Patch 6.0.213 问题: When a file name contains unprintable characters, CTRL-G and other commands don't work well. 解决方案: Turn unprintable into printable characters. (Yasuhiro Matsumoto) 相关文件: src/buffer.c, src/charset.c Patch 6.0.214 问题: When there is a buffer without a name, empty entries appear in the jumplist saved in the viminfo file. 解决方案: Don't write jumplist entries without a file name. 相关文件: src/mark.c Patch 6.0.215 问题: After using "/" from Visual mode the Paste menu and Toolbar entries don't work. Pasting with the middle mouse doesn't work and modeless selection doesn't work. 解决方案: Use the command line mode menus and use the mouse like in the command line. 相关文件: src/gui.c, src/menu.c, src/ui.c Patch 6.0.216 问题: After reloading a file, displayed in another window than the current one, which was changed outside of Vim the part of the file around the cursor set by autocommands may be displayed, but jumping back to the original cursor position when entering the window again. 解决方案: Restore the topline of the window. 相关文件: src/fileio.c Patch 6.0.217 问题: When getting help from a help file that was used before, an empty unlisted buffer remains in the buffer list. (Eric Long) 解决方案: Wipe out the buffer used to do the tag jump from. 相关文件: src/buffer.c, src/ex_cmds.c, src/proto/buffer.pro Patch 6.0.218 问题: With explorer plugin: "vim -o filename dirname" doesn't load the explorer window until entering the window. 解决方案: Call s:EditDir() for each window after starting up. 相关文件: runtime/plugin/explorer.vim Patch 6.0.219 问题: ":setlocal" and ":setglobal", without arguments, display terminal options. (Zdenek Sekera) 解决方案: Skip terminal options for these two commands. 相关文件: src/option.c Patch 6.0.220 问题: After patch 6.0.218 get a beep on startup. (Muraoka Taro) 解决方案: Don't try going to another window when there isn't one. 相关文件: runtime/plugin/explorer.vim Patch 6.0.221 问题: When using ":bdel" and all other buffers are unloaded the lowest numbered buffer is jumped to instead of the most recent one. (Dave Cecil) 解决方案: Prefer an unloaded buffer from the jumplist. 相关文件: src/buffer.c Patch 6.0.222 问题: When 'virtualedit' is set and using autoindent, pressing Esc after starting a new line leaves behind part of the autoindent. (Helmut Stiegler) 解决方案: After deleting the last char in the line adjust the cursor position in del_bytes(). 相关文件: src/misc1.c, src/ops.c Patch 6.0.223 问题: When splitting a window that contains the explorer, hitting CR on a file name gives error messages. 解决方案: Set the window variables after splitting the window. 相关文件: runtime/plugin/explorer.vim Patch 6.0.224 问题: When 'sidescroll' and 'sidescrolloff' are set in a narrow window the text may jump left-right and the cursor is displayed in the wrong position. (Aric Blumer) 解决方案: When there is not enough room, compute the left column for the window to put the cursor in the middle. 相关文件: src/move.c Patch 6.0.225 问题: In Visual mode "gk" gets stuck in a closed fold. (Srinath Avadhanula) 解决方案: Behave differently in a closed fold. 相关文件: src/normal.c Patch 6.0.226 问题: When doing ":recover file" get the ATTENTION prompt. After recovering the same file five times get a read error or a crash. (Alex Davis) 解决方案: Set the recoverymode flag before setting the file name. Correct the amount of used memory for the size of block zero. 相关文件: src/ex_docmd.c Patch 6.0.227 (extra) 问题: The RISC OS port has several problems. 解决方案: Update the makefile and fix some of the problems. (Andy Wingate) 相关文件: src/Make_ro.mak, src/os_riscos.c, src/os_riscos.h, src/proto/os_riscos.pro, src/search.c Patch 6.0.228 问题: After putting text in Visual mode the '] mark is not at the end of the put text. Undo doesn't work properly when putting a word into a Visual selection that spans more than one line. 解决方案: Correct the '] mark for the deleting the Visually selected text. #ifdef code that depends on FEAT_VISUAL properly. Also fix that "d" crossing line boundary puts '[ just before deleted text. Fix undo by saving all deleted lines at once. 相关文件: src/ex_docmd.c, src/globals.h, src/normal.c, src/ops.c, src/structs.h, src/vim.h Patch 6.0.229 问题: Multi-byte: With 'm' in 'formatoptions', formatting doesn't break at a multibyte char followed by an ASCII char, and the other way around. (Muraoka Taro) When joining lines a space is inserted between multibyte characters, which is not always wanted. 解决方案: Check for multibyte character before and after the breakpoint. Don't insert a space before or after a multibyte character when joining lines and the 'M' flag is in 'formatoptions'. Don't insert a space between multibyte characters when the 'B' flag is in 'formatoptions'. 相关文件: src/edit.c, src/ops.c, src/option.h Patch 6.0.230 问题: The ":" used as a motion after an operator is exclusive, but sometimes it should be inclusive. 解决方案: Make the "v" in between an operator and motion toggle inclusive/exclusive. (Servatius Brandt) 相关文件: runtime/doc/motion.txt, src/normal.c Patch 6.0.231 问题: "gd" and "gD" don't work when the variable matches in a comment just above the match to be found. (Servatius Brandt) 解决方案: Continue searching in the first column below the comment. 相关文件: src/normal.c Patch 6.0.232 问题: "vim --version" prints on stderr while "vim --help" prints on stdout. 解决方案: Make "vim --version" use stdout. 相关文件: runtime/doc/starting.txt, src/globals.h, src/main.c, src/message.c Patch 6.0.233 问题: "\1\{,8}" in a regexp is not allowed, but it should work, because there is an upper limit. (Jim Battle) 解决方案: Allow using "\{min,max}" after an atom that can be empty if there is an upper limit. 相关文件: src/regexp.c Patch 6.0.234 问题: It's not easy to set the cursor position without modifying marks. 解决方案: Add the cursor() function. (Yegappan Lakshmanan) 相关文件: runtime/doc/eval.txt, src/eval.c Patch 6.0.235 问题: When writing a file and renaming the original file to make the backup, permissions could change when setting the owner. 解决方案: Only set the owner when it's needed and set the permissions again afterwards. When 'backupcopy' is "auto" check that the owner and permissions of a newly created file can be set properly. 相关文件: src/fileio.c Patch 6.0.236 问题: ":edit" without argument should move cursor to line 1 in Vi compatible mode. 解决方案: Add 'g' flag to 'cpoptions'. 相关文件: runtime/doc/options.txt, src/ex_docmd.c, src/option.h Patch 6.0.237 问题: In a C file, using the filetype plugin, re-indenting a comment with two spaces after the middle "*" doesn't align properly. 解决方案: Don't use a middle entry from a start/middle/end to line up with the start of the comment when the start part doesn't match with the actual comment start. 相关文件: src/misc1.c Patch 6.0.238 问题: Using a ":substitute" command with a substitute() call in the substitution expression causes errors. (Srinath Avadhanula) 解决方案: Save and restore pointers when doing substitution recursively. 相关文件: src/regexp.c Patch 6.0.239 问题: Using "A" to append after a Visually selected block which is after the end of the line, spaces are inserted in the wrong line and other unexpected effects. (Michael Naumann) 解决方案: Don't advance the cursor to the next line. 相关文件: src/ops.c Patch 6.0.240 问题: Win32: building with Python 2.2 doesn't work. 解决方案: Add support for Python 2.2 with dynamic linking. (Paul Moore) 相关文件: src/if_python.c Patch 6.0.241 问题: Win32: Expanding the old value of an option that is a path that starts with a backslash, an extra backslash is inserted. 解决方案: Only insert backslashes where needed. Also handle multibyte characters properly when removing backslashes. 相关文件: src/option.c Patch 6.0.242 问题: GUI: On a system with an Exceed X server sometimes get a "Bad Window" error. (Tommi Maekitalo) 解决方案: When forking, use a pipe to wait in the parent for the child to have done the setsid() call. 相关文件: src/gui.c Patch 6.0.243 问题: Unix: "vim --version" outputs a NL before the last line instead of after it. (Charles Campbell) 解决方案: Send the NL to the same output stream as the text. 相关文件: src/message.c, src/os_unix.c, src/proto/message.pro Patch 6.0.244 问题: Multi-byte: Problems with (illegal) UTF-8 characters in menu and file name (e.g., icon text, status line). 解决方案: Correctly handle unprintable characters. Catch illegal UTF-8 characters and replace them with <xx>. Truncating the status line wasn't done correctly at a multibyte character. (Yasuhiro Matsumoto) Added correct_cmdspos() and transchar_byte(). 相关文件: src/buffer.c, src/charset.c, src/ex_getln.c, src/gui.c, src/message.c, src/screen.c, src/vim.h Patch 6.0.245 问题: After using a color scheme, setting the 'background' option might not work. (Peter Horst) 解决方案: Disable the color scheme if it switches 'background' back to the wrong value. 相关文件: src/option.c Patch 6.0.246 问题: ":echomsg" didn't use the highlighting set by ":echohl". (Gary Holloway) 解决方案: Use the specified attributes for the message. (Yegappan Lakshmanan) 相关文件: src/eval.c Patch 6.0.247 问题: GTK GUI: Can't use gvim in a kpart widget. 解决方案: Add the "--echo-wid" argument to let Vim echo the window ID on stdout. (Philippe Fremy) 相关文件: runtime/doc/starting.txt, src/globals.h, src/gui_gtk_x11.c, src/main.c Patch 6.0.248 问题: When using compressed help files and 'encoding' isn't "latin1", Vim converts the help file before decompressing. (David Reviejo) 解决方案: Don't convert a help file when 'binary' is set. 相关文件: src/fileio.c Patch 6.0.249 问题: "vim -t edit -c 'sta ex_help'" doesn't move cursor to edit(). 解决方案: Don't set the cursor on the first line for "-c" arguments when there also is a "-t" argument. 相关文件: src/main.c Patch 6.0.250 (extra) 问题: Macintosh: Various problems when compiling. 解决方案: Various fixes, mostly #ifdefs. (Dany St. Amant) 相关文件: src/gui_mac.c, src/main.c, src/misc2.c, src/os_mac.h, src/os_mac.pbproj/project.pbxproj, src/os_unix.c Patch 6.0.251 (extra) 问题: Macintosh: menu shortcuts are not very clear. 解决方案: Show the shortcut with the Mac clover symbol. (raindog) 相关文件: src/gui_mac.c Patch 6.0.252 问题: When a user function was defined with "abort", an error that is not inside if/endif or while/endwhile doesn't abort the function. (Servatius Brandt) 解决方案: Don't reset did_emsg when the function is to be aborted. 相关文件: src/ex_docmd.c Patch 6.0.253 问题: When 'insertmode' is set, after "<C-O>:edit file" the next <C-O> doesn't work. (Benji Fisher) <C-L> has the same problem. 解决方案: Reset need_start_insertmode once in edit(). 相关文件: src/edit.c Patch 6.0.254 (extra) 问题: Borland C++ 5.5: Checking for stack overflow doesn't work correctly. Matters when using a complicated regexp. 解决方案: Remove -N- from Make_bc5.mak. (Yasuhiro Matsumoto) 相关文件: src/Make_bc5.mak Patch 6.0.255 (extra) (depends on patch 6.0.116 and 6.0.121) 问题: Win32: ACL support doesn't work well on Samba drives. 解决方案: Add a check for working ACL support. (Mike Williams) 相关文件: src/os_win32.c Patch 6.0.256 (extra) 问题: Win32: ":highlight Comment guifg=asdf" does not give an error message. (Randall W. Morris) Also for other systems. 解决方案: Add gui_get_color() to give one error message for all systems. 相关文件: src/gui.c, src/gui_amiga.c, src/gui_athena.c, src/gui_motif.c, src/gui_riscos.c, src/gui_x11.c, src/gui_gtk_x11.c, src/proto/gui.pro, src/syntax.c Patch 6.0.257 问题: Win32: When 'mousefocus' is set and there is a BufRead autocommand, after the dialog for permissions changed outside of Vim: 'mousefocus' stops working. (Robert Webb) 解决方案: Reset need_mouse_correct after checking timestamps. 相关文件: src/fileio.c Patch 6.0.258 问题: When 'scrolloff' is 999 and there are folds, the text can jump up and down when moving the cursor down near the end of the file. (Lubomir Host) 解决方案: When putting the cursor halfway the window start counting lines at the end of a fold. 相关文件: src/move.c Patch 6.0.259 问题: MS-DOS: after editing the command line the cursor shape may remain like in Insert mode. (Volker Kiefel) 解决方案: Reset the cursor shape after editing the command line. 相关文件: src/ex_getln.c Patch 6.0.260 问题: GUI: May crash while starting up when giving an error message for missing color. (Servatius Brandt) 解决方案: Don't call gui_write() when still starting up. Don't give error message for empty color name. Don't use 't_vb' while the GUI is still starting up. 相关文件: src/fileio.c, src/gui.c, src/misc1.c, src/ui.c Patch 6.0.261 问题: nr2char() and char2nr() don't work with multibyte characters. 解决方案: Use 'encoding' for these functions. (Yasuhiro Matsumoto) 相关文件: runtime/doc/eval.txt, src/eval.c Patch 6.0.262 (extra) 问题: Win32: IME doesn't work properly. OnImeComposition() isn't used at all. 解决方案: Adjust various things for IME. 相关文件: src/globals.h, src/gui_w32.c, src/mbyte.c, src/proto/ui.pro, src/structs.h, src/ui.c Patch 6.0.263 问题: GTK: When a dialog is closed by the window manager, Vim hangs. (Christian J. Robinson) 解决方案: Use GTK_WIDGET_DRAWABLE() instead of GTK_WIDGET_VISIBLE(). 相关文件: src/gui_gtk.c, src/gui_gtk_x11.c Patch 6.0.264 问题: The amount of virtual memory is used to initialize 'maxmemtot', which may be much more than the amount of physical memory, resulting in a lot of swapping. 解决方案: Get the amount of physical memory with sysctl(), sysconf() or sysinfo() when possible. 相关文件: src/auto/configure, src/configure.in, src/config.h.in, src/os_unix.c, src/os_unix.h Patch 6.0.265 问题: Win32: Using backspace while 'fkmap' is set causes a crash. (Jamshid Oasjmoha) 解决方案: Don't try mapping special keys. 相关文件: src/farsi.c Patch 6.0.266 问题: The rename() function deletes the file if the old and the new name are the same. (Volker Kiefel) 解决方案: Don't do anything if the names are equal. 相关文件: src/fileio.c Patch 6.0.267 问题: UTF-8: Although 'isprint' says a character is printable, utf_char2cells() still considers it unprintable. 解决方案: Use vim_isprintc() for characters up to 0x100. (Yasuhiro Matsumoto) 相关文件: src/mbyte.c Patch 6.0.268 (extra) (depends on patch 6.0.255) 问题: Win32: ACL check crashes when using forward slash in file name. 解决方案: Improve the check for the path in the file name. 相关文件: src/os_win32.c Patch 6.0.269 问题: Unprintable characters in a file name may cause problems when using the 'statusline' option or when 'buftype' is "nofile". 解决方案: call trans_characters() for the resulting statusline. (Yasuhiro Matsumoto) 相关文件: src/buffer.c, src/screen.c, src/charset.c Patch 6.0.270 (depends on patch 6.0.267) 问题: A tab causes UTF-8 text to be displayed in the wrong position. (Ron Aaron) 解决方案: Correct utf_char2cells() again. 相关文件: src/mbyte.c Patch 6.1a.001 (extra) 问题: 32bit DOS: copying text to the clipboard may cause a crash. (Jonathan D Johnston) 解决方案: Don't copy one byte too much in SetClipboardData(). 相关文件: src/os_msdos.c Patch 6.1a.002 问题: GTK: On some configurations, when closing a dialog from the window manager, Vim hangs. 解决方案: Catch the "destroy" signal. (Aric Blumer) 相关文件: src/gui_gtk.c Patch 6.1a.003 问题: Multi-byte: With UTF-8 double-wide char and 'virtualedit' set: yanking in Visual mode doesn't include the last byte. (Eric Long) 解决方案: Don't add a space for a double-wide character. 相关文件: src/ops.c Patch 6.1a.004 (extra) 问题: MINGW: undefined type. (Ron Aaron) 解决方案: Make GetCompositionString_inUCS2() static. 相关文件: src/gui_w32.c, src/gui_w48.c, src/proto/gui_w32.pro Patch 6.1a.005 (extra) 问题: Win32: ":hardcopy" doesn't work after ":hardcopy!". (Jonathan Johnston) 解决方案: Don't keep the driver context when using ":hardcopy!". (Vince Negri) 相关文件: src/os_mswin.c Patch 6.1a.006 问题: multibyte: after setting 'encoding' the window title might be wrong. 解决方案: Force resetting the title. (Yasuhiro Matsumoto) 相关文件: src/option.c Patch 6.1a.007 问题: Filetype detection for "*.inc" doesn't work. 解决方案: Use a ":let" command. (David Schweikert) 相关文件: runtime/filetype.vim Patch 6.1a.008 (extra) 问题: Win32: ACL detection for network shares doesn't work. 解决方案: Include the trailing (back)slash in the root path. (Mike Williams) 相关文件: src/os_win32.c Patch 6.1a.009 问题: When using "\@<=" or "\@<!" in a pattern, a "\1" may refer to a () part that follows, but it generates an error message. 解决方案: Allow a forward reference when there is a following "\@<=" or "\@<!". 相关文件: runtime/doc/pattern.txt, src/regexp.c Patch 6.1a.010 问题: When using ":help" and opening a new window, the alternate file isn't set. 解决方案: Set the alternate file to the previously edited file. 相关文件: src/ex_cmds.c Patch 6.1a.011 问题: GTK: ":set co=77", change width with the mouse, ":set co=77" doesn't resize the window. (Darren Hiebert) 解决方案: Set the form size after handling a resize event. 相关文件: src/gui_gtk_x11.c Patch 6.1a.012 问题: GTK: The file browser always returns a full path. (Lohner) 解决方案: Shorten the file name if possible. 相关文件: src/gui_gtk.c Patch 6.1a.013 问题: When using "=~word" in 'cinkeys' or 'indentkeys', the case of the last character of the word isn't ignored. (Raul Segura Acevedo) 解决方案: Ignore case when checking the last typed character. 相关文件: src/edit.c Patch 6.1a.014 问题: After patch 6.1a.006 can't compile without the title feature. 解决方案: Add an #ifdef. 相关文件: src/option.c Patch 6.1a.015 问题: MS-Windows: When expanding a file name that contains a '[' or '{' an extra backslash is inserted. (Raul Segura Acevedo) 解决方案: Avoid adding the backslash. 相关文件: src/ex_getln.c Patch 6.1a.016 问题: Completion after ":language" doesn't include "time". (Raul Segura Acevedo) 解决方案: Add the alternative to the completions. 相关文件: src/ex_cmds2.c Patch 6.1a.017 问题: Clicking the mouse in the top row of a window where the first line doesn't fit moves the cursor to the wrong column. 解决方案: Add the skipcol also for the top row of a window. 相关文件: src/ui.c Patch 6.1a.018 问题: When 'scrolloff' is one and the window height is one, "gj" can put the cursor above the window. (Raul Segura Acevedo) 解决方案: Don't let skipcol become bigger than the cursor column. 相关文件: src/move.c Patch 6.1a.019 问题: When using a composing character on top of an ASCII character, the "l" command clears the composing character. Only when 'ruler' and 'showcmd' are off. (Raphael Finkel) 解决方案: Don't move the cursor by displaying characters when there are composing characters. 相关文件: src/screen.c Patch 6.1a.020 问题: GTK: after patch 6.1a.011 resizing with the mouse doesn't always work well for small sizes. (Adrien Beau) 解决方案: Use another way to avoid the problem with ":set co=77". 相关文件: src/gui_gtk_x11.c Patch 6.1a.021 问题: Several Syntax menu entries are wrong or confusing. 解决方案: Rephrase and correct the menu entries. (Adrien Beau) 相关文件: runtime/makemenu.vim, runtime/menu.vim Patch 6.1a.022 问题: A tags file might be used twice on case insensitive systems. (Rick Swanton) 解决方案: Don't use the same file name twice in the default for the 'tags' option. Ignore case when comparing names of already visited files. 相关文件: src/misc2.c, src/option.c Patch 6.1a.023 问题: When starting the GUI get "C" characters echoed in the terminal. 解决方案: Don't try sending a clear-screen command while the GUI is starting up. 相关文件: src/screen.c Patch 6.1a.024 问题: In other editors CTRL-F is often used for a find dialog. 解决方案: In evim use CTRL-F for the find dialog. 相关文件: runtime/evim.vim Patch 6.1a.025 问题: The choices for the fileformat dialog can't be translated. 解决方案: Add g:menutrans_fileformat_choices. (Adrien Beau) 相关文件: runtime/menu.vim Patch 6.1a.026 问题: Indenting Java files is wrong with "throws", "extends" and "implements" clauses. 解决方案: Update the Java indent script. 相关文件: runtime/indent/java.vim Patch 6.1a.027 问题: A few Syntax menu entries missing or incorrect. 解决方案: Add and correct the menu entries. (Adrien Beau) Shorten a few menus to avoid they become too long. 相关文件: runtime/makemenu.vim, runtime/menu.vim Patch 6.1a.028 问题: XIM: problems with feedback and some input methods. 解决方案: Use iconv for calculating the cells. Remove the queue for key_press_event only when text was changed. (Yasuhiro Matsumoto) 相关文件: src/globals.h, src/mbyte.c, src/screen.c Patch 6.1a.029 问题: After patch 6.1a.028 can't compile GTK version with XIM but without multibyte chars. 解决方案: Add an #ifdef. (Aschwin Marsman) 相关文件: src/mbyte.c Patch 6.1a.030 问题: With double-byte encodings toupper() and tolower() may have wrong results. 解决方案: Skip double-byte characters. (Eric Long) 相关文件: src/eval.c Patch 6.1a.031 问题: Accessing the 'balloondelay' variable may cause a crash. 解决方案: Make the variable for 'balloondelay' a long. (Olaf Seibert) 相关文件: src/option.h Patch 6.1a.032 (extra) 问题: Some menu files used a wrong encoding name for "scriptencoding". 解决方案: Move the translations to a separate file, which is sourced after setting "scriptencoding". Also add Czech menu translations in ASCII and update the other encodings. 相关文件: runtime/lang/menu_cs_cz.iso_8859-1.vim, runtime/lang/menu_cs_cz.iso_8859-2.vim, runtime/lang/menu_czech_czech_republic.1250.vim, runtime/lang/menu_czech_czech_republic.1252.vim, runtime/lang/menu_czech_czech_republic.ascii.vim, runtime/lang/menu_de_de.iso_8859-1.vim, runtime/lang/menu_de_de.latin1.vim, runtime/lang/menu_fr_fr.iso_8859-1.vim, runtime/lang/menu_fr_fr.latin1.vim, runtime/lang/menu_french_france.1252.vim, runtime/lang/menu_german_germany.1252.vim, runtime/lang/menu_ja_jp.euc-jp.vim, runtime/lang/menu_ja_jp.utf-8.vim, runtime/lang/menu_japanese_japan.932.vim Patch 6.1a.033 问题: XIM: doesn't reset input context. 解决方案: call xim_reset() with im_set_active(FALSE). (Takuhiro Nishioka) 相关文件: src/mbyte.c Patch 6.1a.034 (extra) 问题: Win32: The ACL checks for a readonly file still don't work well. 解决方案: Remove the ACL checks, go back to how it worked in Vim 6.0. 相关文件: src/os_win32.c Patch 6.1a.035 问题: multibyte: When using ":sh" in the GUI, typed and displayed multibyte characters are not handled correctly. 解决方案: Deal with multibyte characters to and from the shell. (Yasuhiro Matsumoto) Also handle UTF-8 composing characters. 相关文件: src/os_unix.c Patch 6.1a.036 问题: GTK: the save-yourself event was not handled. 解决方案: Catch the save-yourself event and preserve swap files. (Neil Bird) 相关文件: src/gui_gtk_x11.c Patch 6.1a.037 问题: The MS-Windows key mapping doesn't include CTRL-S for saving. (Vlad Sandrini) 解决方案: Map CTRL-S to ":update". 相关文件: runtime/mswin.vim Patch 6.1a.038 问题: Solaris: Including both sys/sysctl.h and sys/sysinfo.h doesn't work. (Antonio Colombo) 解决方案: Don't include sys/sysinfo.h when not calling sysinfo(). 相关文件: src/os_unix.c Patch 6.1a.039 问题: Not all visual basic files are recognized. 解决方案: Add checks to catch *.ctl files. (Raul Segura Acevedo) 相关文件: runtime/filetype.vim Patch 6.1a.040 问题: A *.pl file is recognized as Perl, but it could be a prolog file. 解决方案: Check the first non-empty line. (Kontra Gergely) 相关文件: runtime/filetype.vim Patch 6.1a.041 问题: When pressing the left mouse button in the command line and them moving the mouse upwards, nearly all the text is selected. 解决方案: Don't try extending a modeless selection when there isn't one. 相关文件: src/ui.c Patch 6.1a.042 问题: When merging files, ":diffput" and ":diffget" are used a lot, but they require a lot of typing. 解决方案: Add "dp" for ":diffput" and "do" for ":diffget". 相关文件: runtime/doc/diff.txt, src/diff.c, src/normal.c, src/proto/diff.pro Patch 6.1b.001 (extra) 问题: Checking for wildcards in a path does not handle multibyte characters with a trail byte which is a wildcard. 解决方案: Handle multibyte characters correctly. (Muraoka Taro) 相关文件: src/os_amiga.c, src/os_mac.c, src/os_msdos.c, src/os_mswin.c, src/os_unix.c Patch 6.1b.002 问题: A regexp that ends in "\{" is not flagged as an error. May cause a stack overflow when 'incsearch' is set. (Gerhard Hochholzer) 解决方案: Handle a missing "}" as an error. 相关文件: src/regexp.c Patch 6.1b.003 (extra) 问题: The RISC OS GUI doesn't compile. 解决方案: Include changes since Vim 5.7. (Andy Wingate) 相关文件: src/Make_ro.mak, src/gui_riscos.c, src/os_riscos.c, src/os_riscos.h, src/proto/gui_riscos.pro Patch 6.1b.004 问题: col("'>") returns a negative number for linewise selection. (Neil Bird) 解决方案: Don't add one to MAXCOL. 相关文件: src/eval.c Patch 6.1b.005 问题: Using a search pattern that causes an out-of-stack error while 'hlsearch' is set keeps giving the hit-Enter prompt. A search pattern that takes a long time delays typing when 'incsearch' is set. 解决方案: Stop 'hlsearch' highlighting when the regexp causes an error. Stop searching for 'incsearch' when a character is typed. 相关文件: src/globals.h, src/message.c, src/screen.c, src/search.c, src/vim.h Patch 6.1b.006 问题: When entering a composing character on the command line with CTRL-V, the text isn't redrawn correctly. 解决方案: Redraw the text under and after the cursor. 相关文件: src/ex_getln.c Patch 6.1b.007 问题: When the cursor is in the white space between two sentences, "dis" deletes the first character of the following sentence, "das" deletes a space after the sentence. 解决方案: Backup the cursor one character in these situations. 相关文件: src/search.c Patch 6.1b.008 问题: *.xsl files are not recognized as xslt but xml. Monk files are not recognized. 解决方案: Delete the duplicate line for *.xsl. (Johannes Zellner) Recognize monk files. 相关文件: runtime/filetype.vim Patch 6.1b.009 问题: Can't always compile small features and then adding eval feature, "sandbox" is undefined. (Axel Kielhorn) 解决方案: Always define "sandbox" when the eval feature is used. 相关文件: src/globals.h Patch 6.1b.010 (extra) 问题: When compiling gvimext.cpp with MSVC 4.2 get a number of warnings. 解决方案: Change "true" to "TRUE". (Walter Briscoe) 相关文件: GvimExt/gvimext.cpp Patch 6.1b.011 问题: When using a very long string for confirm(), can't quit the displaying at the more prompt. (Hari Krishna Dara) 解决方案: Jump to the end of the message to show the choices. 相关文件: src/message.c Patch 6.1b.012 问题: Multi-byte: When 'showbreak' is set and a double-wide character doesn't fit at the right window edge the cursor gets stuck there. Using cursor-left gets stuck when 'virtualedit' is set. (Eric Long) 解决方案: Fix the way the extra ">" character is counted when 'showbreak' is set. Don't correct cursor for virtual editing on a double-wide character. 相关文件: src/charset.c, src/edit.c Patch 6.1b.013 问题: A user command that partly matches with a buffer-local user command and matches full with a global user command unnecessarily gives an 'ambiguous command' error. 解决方案: Find the full global match even after a partly local match. 相关文件: src/ex_docmd.c Patch 6.1b.014 问题: EBCDIC: switching mouse events off causes garbage on screen. Positioning the cursor in the GUI causes garbage. 解决方案: Insert an ESC in the terminal code. (Ralf Schandl) Use "\b" instead of "\010" for KS_LE. 相关文件: src/os_unix.c, src/term.c Patch 6.1b.015 问题: Vimtutor has a typo. Get a warning for "tempfile" if it doesn't exist. 解决方案: Move a quote to the end of a line. (Max Ischenko) Use "mktemp" first, more systems have it. 相关文件: src/vimtutor Patch 6.1b.016 问题: GTK: loading a fontset that works partly, Vim might hang or crash. 解决方案: Avoid that char_width becomes zero. (Yasuhiro Matsumoto) 相关文件: src/gui_gtk_x11.c Patch 6.1b.017 问题: GUI: When using ":shell" and there is a beep, nothing happens. 解决方案: Call vim_beep() to produce the beep from the shell. (Yasuhiro Matsumoto) 相关文件: src/message.c Patch 6.1b.018 (depends on 6.1b.006) 问题: When entering the encryption key, special keys may still reveal the typed characters. 解决方案: Make sure stars are used or nothing is shown in all cases. 相关文件: src/digraph.c, src/getchar.c, src/ex_getln.c Patch 6.1b.019 (depends on 6.1b.005) 问题: A search pattern that takes a long time slows down typing when 'incsearch' is set. 解决方案: Pass SEARCH_PEEK to dosearch(). 相关文件: src/ex_getln.c Patch 6.1b.020 问题: When using the matchit plugin, "%" finds a match on the "end" of a ":syntax region" command in Vim scripts. 解决方案: Skip over ":syntax region" commands by setting b:match_skip. 相关文件: runtime/ftplugin/vim.vim Patch 6.1b.021 问题: when 'mousefocus' is set, CTRL-W CTRL-] sometimes doesn't warp the pointer to the new window. (Robert Webb) 解决方案: Don't reset need_mouse_correct when checking the timestamp of a file. 相关文件: src/fileio.c Patch 6.1b.022 问题: With lots of folds "j" does not obey 'scrolloff' properly. (Srinath Avadhanula) 解决方案: Go to end of the fold before counting context lines. 相关文件: src/move.c Patch 6.1b.023 问题: On MS-Windows system() may cause checking timestamps, because Vim loses and gains input focus, while this doesn't happen on Unix. 解决方案: Don't check timestamps while system() is busy. 相关文件: src/ex_cmds2.c, src/fileio.c, src/globals.h, src/misc1.c Patch 6.1b.024 (extra) 问题: Gettext 0.11 complains that "sjis" is not a standard name. 解决方案: Use "cp932" instead. 相关文件: src/po/sjiscorr.c Patch 6.1b.025 (extra) 问题: Win32: When closing gvim while it is minimized and has a changed file, the file-changed dialog pops up in a corner of the screen. 解决方案: Put the dialog in the middle of the screen. 相关文件: src/gui_w48.c Patch 6.1b.026 问题: When 'diffopt' contains 'iwhite' but not 'icase': differences in case are not highlighted properly. (Gerhard Hochholzer) 解决方案: Don't ignore case when ignoring white space differences. 相关文件: src/diff.c Patch 6.1b.027 问题: "vim --remote +" may cause a crash. 解决方案: Check for missing file name argument. (Martin Kahlert) 相关文件: src/main.c Patch 6.1b.028 (extra) 问题: Win16: Can't compile after patch 6.1b.025. 解决方案: Add code specifically for Win16. (Vince Negri) 相关文件: src/gui_w48.c Patch 6.1b.029 问题: Win32: When a directory on an NTFS partition is read/execute (no delete,modify,write) and the file has modify rights, trying to write the file deletes it. Making the file read/write/execute (not delete) solves it. (Mark Canup) 解决方案: Use the Unix code to check for a writable directory. If not, then make a backup copy and overwrite the file. 相关文件: src/fileio.c Patch 6.1b.030 (extra) 问题: Mac: small mistake in the build script and prototypes. 解决方案: Fix the build script and add the prototypes. (Axel Kielhorn) 相关文件: src/os_mac.build, src/gui_mac.c Patch 6.1b.031 (extra) 问题: Win32 GUI: ":set guifont=*" doesn't set 'guifont' to the resulting font name. (Vlad Sandrini) 解决方案: Put the code back in gui_mch_init_font() to form the font name out of the logfont. 相关文件: src/gui_w48.c Patch 6.1b.032 问题: Athena: Setting a color scheme before the GUI has started causes a crash. (Todd Blumer) 解决方案: Don't try using color names that haven't been set yet. 相关文件: src/gui_athena.c Patch 6.1b.033 问题: When using a count after a ":s" command may get ml_get errors. (Dietmar Lang) 解决方案: Check that the resulting range does not go past the end of the buffer. 相关文件: src/ex_cmds.c Patch 6.1b.034 问题: After sourcing mswin.vim, when using <C-S-Right> after auto-indenting and then <Del>, get warning for allocating ridiculous amount of memory. (Dave Delgreco) 解决方案: Adjust the start of the Visual area when deleting the auto-indent. 相关文件: src/edit.c Patch 6.1b.035 问题: When using evim, dropping a file on Vim and then double clicking on a word, it is changed to "i". (Merlin Hansen) 解决方案: Reset need_start_insertmode after editing the file. 相关文件: src/ex_docmd.c

6.2 版 本 version-6.2

本小节讨论 6.2 和 6.3 版本之间的改进。 这是一个漏洞修正版。也有一些新特性。 主要的新特性: - 支持 GTK 2。(Daniel Elstner) - 支持编辑阿拉伯文本。(Nadim Shaikli 和 Isam Bayazidi) - ":try" 命令和例外处理。(Servatius Brandt) - 支持 neXtaw GUI 工具集 (非常像 Athena)。(Alexey Froloff) - Win32 的 Cscope 支持。(Khorev Sergey) - 支持各种 8 位编码的 PostScript 打印。(Mike Williams) 改动 changed-6.2

删除 scheme 缩进文件,内部的 Lisp 缩进现在已经很好了。 GvimEXt、OleVim 和 VisVim 目录移到 "src" 目录。和 xxd 的处理方式更加一致。 VisVim.dll 文件安装在顶层目录,紧靠着 gvimext.dll,而不是在 "VisVim" 子目录。 修正 NSIS 卸载它时找到错误目录的问题。 删除 art 缩进文件。它什么都不做。 submatch() 返回的换行符过去使用 CR 而不是 LF。 Win32 的 makefile 更加统一,也能编译 gvimext.dll。(Dan Sharp) 'cindent': "//" 注释和前一行的 "//" 注释对齐。(Helmut Stiegler) 以前只有 xterm 和相近的终端上跟踪父窗口组件 (widget) 以寻找标题和图标文字。现 在对所有的终端模拟器都这么做。 "%" 匹配时可以识别反斜杠。'cpoptions' 的 'M' 标志位禁止如此。(Haakon Riiser) 删除 Turbo C 的 Make_tcc.mak makefile。已经不能用而我们可能也没有办法让它好起 来 (编译器内存溢出)。 即使文档说明的是关键字,"[ CTRL-D" 过去使用 'isident' 来寻找匹配。现在改为 'iskeyword'。也适用于其它搜索头文件里宏定义单词的命令,包括 ":dsearch"、"[D" 和 "[d"。 使得 'keywordprg' 为全局-局部变量。(Christian Robinson) 缺省打开 Netbeans 接口。反转 configure 的参数,从 "--enable-netbeans" 到 "--disable-netbeans"。 新增 added-6.2

新选项: 'arabic' 'arabicshape' 'ambiwidth' 'autochdir' 'casemap' 'copyindent' 'cscopequickfix' 'preserveindent' 'printencoding' 'rightleftcmd' 'termbidi' 'toolbariconsize' 'winfixheight' 新键盘映射表: 塞尔维亚语 (Aleksandar Veselinovic) 中文拼音 (Fredrik Roubert) 世界语 (Antoine J. Mechelynck) 新语法文件: Valgrind (Roger Luethi) Smarty template (Manfred Stienstra) MySQL (Kenneth Pronovici) RockLinux package description (Piotr Esden-Tempski) MMIX (Dirk Huesken) gkrellmrc (David Necas) Tilde (Tobias Rundtrom) Logtalk (Paulo Moura) PLP (Juerd Waalboer) fvwm2m4 (David Necas) IPfilter (Hendrik Scholz) fstab (Radu Dineiu) Quake (Nikolai Weibull) Occam (Mario Schweigler) lpc (Shizhu Pan) Exim conf (David Necas) EDIF (Artem Zankovich) .cvsrc (Nikolai Weibull) .fetchmailrc (Nikolai Weibull) GNU gpg (Nikolai Weibull) Grub (Nikolai Weibull) Modconf (Nikolai Weibull) RCS (Dmitry Vasiliev) Art (Dorai Sitaram) Renderman Interface Bytestream (Andrew J Bromage) Mailcap (Doug Kearns) Subversion commit file (Dmitry Vasiliev) Microsoft IDL (Vadim Zeitlin) WildPackets EtherPeek Decoder (Christopher Shinn) Spyce (Rimon Barr) Resolv.conf (Radu Dineiu) A65 (Clemens Kirchgatterer) sshconfig 和 sshdconfig (David Necas) Cheetah 和 HTMLCheetah (Max Ischenko) Packet filter (Camiel Dobbelaar) 新缩进文件: Eiffel (David Clarke) Tilde (Tobias Rundtrom) Occam (Mario Schweigler) Art (Dorai Sitaram) PHP (Miles Lott) Dylan (Brent Fulgham) 新教程翻译: 斯洛伐克语 (Lubos Celko) 希腊语 (Christos Kontas) 德语 (Joachim Hofmann) 挪威语 (Øyvind Holm) 新文件类型插件: Occam (Mario Schweigler) Art (Dorai Sitaram) ant.vim、aspvbs.vim、config.vim、csc.vim、csh.vim、dtd.vim、html.vim, jsp.vim、pascal.vim、php.vim、sgml.vim、sh.vim、svg.vim、tcsh.vim, xhtml.vim、xml.vim、xsd.vim。(Dan Sharp) 新编译器插件: Checkstyle (Doug Kearns) g77 (Ralf Wildenhues) fortran (Johann-Guenter Simon) Xmllint (Doug Kearns) Ruby (Tim Hammerquist) Modelsim vcom (Paul Baleme) 新菜单翻译: 巴西 (葡萄牙) 语 (José de Paula) 英国英语 (Mike Williams) UTF-8 韩语 (Nam SungHyun) 挪威语 (Øyvind Holm) 塞尔维亚语 (Aleksandar Jelenak) 挪威语的新消息翻译。(Øyvind Holm) 新色彩方案: desert (Hans Fugal) 阿拉伯语专用特性。'arabicshape''termbidi''arabic''rightleftcmd' 选项。 (Nadim Shaikli 和 Isam Bayazidi) 支持 neXtaw GUI toolkit,基本类似于 Athena。(Alexey Froloff) Win32: cscope 支持。(Khorev Sergey) VMS: 若干文档和 makefile 的改进。(Zoltan Arpadffy) 探索器插件加入 "x" 键: 执行缺省动作。(Yasuhiro Matsumoto) 用 MingW 编译 gvimext.dll。(Rene de Zwart) 加入 "tohtml.vim" 插件。它定义了 ":TOhtml" 用户命令,提供把文本转换为 HTML 的 简易方法。 加入 ":try" / ":catch" / ":finally" / ":endtry" 命令。加入 E999 编号到所有的错 误信息,以便能用编号捕获它们。(Servatius Brandt) ex_docmd.c 部分内容移到新的 ex_eval.c 源文件。 加入 GTK+ 2.2.x 的支持 (Daniel Elstner) 加入 "~" 寄存器: 拖放文本。 加入 'toolbariconsize' 选项。 运行 lint 时加入 -Dalloca,处理 alloca() 原型的问题。 在错误窗口里选择项目用于跳转时,努力寻找一个普通窗口 (不是预览窗口) 来显示该文 件。 支持若干 8 位编码的 PostScript 打印。(Mike Williams) inputdialog() 接受第三个参数,取消对话框时使用。可以用来区别取消和什么都不输入 的情况。 加入 Aap 构造文件 (recipe)。用于更新 Vim 到最新的版本、编译和安装。 'cinoptions' 的 "/" 选项: 注释行的额外缩进。(Helmut Stiegler) Vim 变量 "v:register" 和 setreg()、getreg() 和 getregtype() 函数。(Michael Geddes) 'cpoptions' 的 "v" 标志位: 插入模式使用退格保留屏幕上的文本。(Phillip Vandry) Dosinst.exe 也会在 "GvimExt" 目录里寻找 gvimext.dll。用于在 "src" 目录安装时进 行测试。 支持忽略大小写的排序方式的标签文件。(Flemming Madsen) 补全开头的路径部分里的通配符,如 "../*/Makefile" 时,只列出最后一个部分 ("Makefile")。支持自定义的命令行补全。(Flemming Madsen) "rxvt" 也被识别为和 xterm 类似的终端。(Tomas Styblo) 适当的 X11 会话处理。修正流行的桌面系统不使用 WM_SAVE_YOURSELF 事件的问题。 (Neil Bird) 不用于 Gnome 2,它有自己的处理方式。 支持 Borland 3 makefile 的 BOR、DEBUG 和 SPAWNO 参数。(Walter Briscoe) 支持打印时的换页。'printoptions' 加入 "formfeed" 字段。(Mike Williams) Mac OSX: 多语言支持: iconv 和 gettext。(Muraoka Taro,Axel Kielhorn) 模式里的 "\Z" 标志位: 忽略组合字符的差异。(Ron Aaron) 加入 'preserveindent''copyindent' 选项。它们使用已存在的空白字符,而不是尽 可能多地使用制表。(Chris Leishman) 更新 Unicode 表到 Unicode 4.0。(Raphael Finkel) 支持 rxvt 里的鼠标滚轮。(AIDA Shinra) Win32: 加入 ":8" 文件名修饰符以得到短文件名。Test50 测试 Win32 系统的 ":8" 扩 展。(Michael Geddes) 'cscopequickfix' 选项: Cscope 命令的快速修复窗口。同时清理代码,给出消息。 (Khorev Sergey) GUI: 鼠标位置支持多于 222 列。 ":stopinsert" 命令: 不回到插入模式。 调试模式的 "interrupt" 命令。用于模拟 CTRL-C。(Servatius Brandt) 修正 fixed-6.2

Removed a few unused #defines from config.h.in, os_os2_cfg.h and os_vms_conf.h. The Vim icons in PNG format didn't have a transparent background. (Greg Roelofs) Fixed a large number of spelling mistakes in the docs. (Adri Verhoef) The #defines for prototype generation were causing trouble. Changed them to typedefs. A new version of libintl.h uses __asm__, which confuses cproto. Define a dummy __asm__ macro. When 'virtualedit' is set can't move to halfway an unprintable character. Cripples CTRL-V selection. (Taro Muraoka) Allow moving to halfway an unprintable character. Don't let getvvcol() change the pos->coladd argument. When a tab wraps to the next line, 'listchars' is set and 'foldcolumn' is non-zero, only one character of the foldcolumn is highlighted. (Muraoka Taro) When using ":catch" without an argument Vim crashes. (Yasuhiro Matsumoto) When no argument given use the ".*" pattern. Win32: When gvim.exe is started from a shortcut with the window style property set to maximize Vim doesn't start with a maximized window. (Yasuhiro Matsumoto) Open the window with the default size and don't call ShowWindow() again when it's already visible. (Helmut Stiegler) gui_gtk.c used MAX, but it's undefined to avoid a conflict with system header files. Win32: When closing a window from a mapping some pixels remain on the statusline. (Yasuhiro Matsumoto) A column number in an errorformat that goes beyond the end of the line may cause a crash. ":throw 'test'" crashes Vim. (Yasuhiro Matsumoto) The file selector's scrollbar colors are not set after doing a ":hi Scrollbar guifg=color". And the file selector's colors are not changed by the colorscheme command. (David Harrison) Motif: When compiling with FEAT_FOOTER defined, the text area gets a few pixels extra space on the right. Remove the special case in gui_get_base_width(). (David Harrison) Using CTRL-R CTRL-P in Insert mode puts the '] mark in the wrong position. (Helmut Stiegler) When 'formatoptions' includes "awct" a non-comment wasn't auto-formatted. Using a "--cmd" argument more than 10 times caused a crash. DEC style mouse support didn't work if the page field is not empty. (Uribarri) "vim -l one two" did only set 'lisp' in the first file. Vi does it for every file. ":set tw<" didn't work. Was checking for '^' instead of '<'. In ":hardcopy > %.ps" the "%" was not expanded to the current filename. Made ":redraw" also update the Visual area. When a not implemented command, such as ":perl", has wrong arguments the less important error was reported, giving the user the idea the command could work. On non-Unix systems autocommands for writing did not attempt a match with the short file name, causing a pattern like "a/b" to fail. VMS: e_screenmode was not defined and a few other fixes for VMS. (Zoltan Arpadffy) redraw_msg() depended on FEAT_ARABIC instead of FEAT_RIGHTLEFT. (Walter Briscoe) Various changes for the PC Makefiles. (Walter Briscoe) Use _truename() instead of our own code to expand a file name into a full path. (Walter Briscoe) Error in filetype check for /etc/modutils. (Lubomir Host) Cscope interface: allocated a buffer too small. Win16: remove a trailing backslash from a path when obtaining the permission flags. (Vince Negri) When searching for tags with case ignored Vim could hang. When searching directories with a stopdir could get a crash. Did not re-allocate enough memory. (Vince Negri) A user command may cause a crash. Don't use the command index when it's negative. (Vince Negri) putenv() didn't work for MingW and Cygwin. (Dan Sharp) Many functions were common between os_msdos.c and os_win16.c. Use os_msdos.c for compiling the Win16 version and remove the functions from os_win16.c. (Vince Negri) For terminals that behave like an xterm but didn't have a name that is recognized, the window title would not always be set. When syntax highlighting is off ":hardcopy" could still attempt printing colors. Crash when using ":catch" without an argument. (Servatius Brandt) Win32: ":n #" doubled the backslashes. Fixed Arabic shaping for the command line. (Nadim Shaikli) Avoid splitting up a string displayed on the command line into individual characters, it breaks Arabic shaping. Updated Cygwin and MingW makefiles to use more dependencies. (Dan Sharp) 2html.vim didn't work with 'nomagic' set. When a local argument list is used and doing ":only" Vim could crash later. (Muraoka Taro) When using "%P" in 'statusline' and the fillchar is "-", a percentage of 3% could result in "-3%". Also avoid changing a space inside a filename to the fill character. MSwin: Handling of backslashes and double quotes for command line arguments was not like what other applications do. (Walter Briscoe) Test32 sometimes didn't work, because test11.out was written as TEST11.OUT. Avoid pointer conversions warnings for Borland C 5.5 in dosinst.c and uninstal.c. More improvements for Make_bc3.mak file. (Walter Briscoe) When ":syn sync linebreaks=1" is used, editing the first line caused a redraw of the whole screen. Making translated messages didn't work, if_perl.xs wasn't found. (Vlad Sandrini) Motif and Athena: moving Vim to the foreground didn't uniconify it. Use XMapRaised() instead of XRaiseWindow(). (Srikanth Sankaran) When using ":ptag" in a window where 'scrollbind' is set the preview window would also have 'scrollbind' set. Also reset 'foldcolumn' and 'diff'. Various commands that split a window took over 'scrollbind', which is hardly ever desired. Esp. for "q:" and ":copen". Mostly reset 'scrollbind' when splitting a window. When 'shellslash' is set in the vimrc file the first entry of ":scriptnames" would still have backslashes. Entries in the quickfix list could also have wrong (back)slashes. Win32: printer dialog texts were not translated. (Yasuhiro Matsumoto) When using a multibyte character with a K_SPECIAL byte or a special key code with "--remote-send" the received byte sequence was mangled. Put it in the typeahead buffer instead of the input buffer. Win32: The cursor position was incorrect after changing cursor shape. (Yasuhiro Matsumoto). Win32: When 'encoding' is not the current codepage the title could not be set to non-ascii characters. "vim -d scp://machine/file1 scp://machine/file2" did not work, there was only one window. Fixed the netrw plugin not to wipe out the buffer if it is displayed in other windows. "/$" caused "e" in last column of screen to disappear, a highlighted blank was displayed instead. ":s/ *\ze\n//e" removed the line break and introduced arbitrary text. Was using the line count including what matched after the "\ze". Using the "c" flag with ":s" changed the behavior when a line break is replaced and "\@<=" is used. Without "c" a following match was not found. ":%s/\vA@<=\nB@=//gce" got stuck on "A\nB" when entering "n". VMS: add HAVE_STRFTIME in the config file. (Zoltan Arpadffy) When a delete prompts if a delete should continue when yanking is not possible, restore msg_silent afterwards. ":sign" did not complain about a missing argument. When adding or deleting a sign 'hlsearch' highlighting could disappear. Use the generic functions for updating signs. On MS-Windows NT, 2K and XP don't use command.com but cmd.exe for testing. Makes the tests work on more systems. In the DOS tests don't create "/tmp" to avoid an error. Mac classic: Problems with reading files with CR vs CR/LF. Rely on the library version of fgets() to work correctly for Metrowerks 2.2. (Axel Kielhorn) When typing a password a "*" was shown for each byte instead of for each character. Added multibyte handling to displaying the stars. (Yasuhiro Matsumoto) When using Perl 5.6 accessing $curbuf doesn't work. Add an #ifdef to use different code for 5.6 and 5.8. (Dan Sharp) MingW and Cygwin: Don't strip the debug executable. (Dan Sharp) An assignment to a variable with curlies that includes "==" doesn't work. Skip over the curlies before searching for an "=". (Vince Negri) When cancelling the selection of alternate matching tags the tag stack index could be advanced too far, resulting in an error message when using CTRL-T. Patch 6.1.001 问题: When formatting UTF-8 text it might be wrapped at a space that is followed by a composing character. (Raphael Finkel) Also correct a display error for removing a composing char on top of a space. 解决方案: Check for a composing character on a space. 相关文件: src/edit.c, src/misc1.c, src/screen.c Patch 6.1.002 (extra) 问题: Win32: after a ":popup" command the mouse pointer stays hidden. 解决方案: Unhide the mouse pointer before showing the menu. 相关文件: src/gui_w48.c Patch 6.1.003 问题: When 'laststatus' is zero and there is a vertical split, the vertical separator is drawn in the command line. (Srikant Sankaran) 解决方案: Don't draw the vertical separator where there is no statusline. 相关文件: src/screen.c Patch 6.1.004 问题: Unicode 3.2 changes width and composing of a few characters. (Markus Kuhn) 解决方案: Adjust the Unicode functions for the character width and composing characters. 相关文件: src/mbyte.c Patch 6.1.005 问题: When using more than 50 items in 'statusline' Vim might crash. (Steve Hall) 解决方案: Increment itemcnt in check_stl_option(). (Flemming Madsen) 相关文件: src/option.c Patch 6.1.006 问题: When using "P" in Visual mode to put linewise selected text, the wrong text is deleted. (Jakub Turski) 解决方案: Put the text before the Visual area and correct the text to be deleted for the inserted lines. Also fix that "p" of linewise text in Visual block mode doesn't work correctly. 相关文件: src/normal.c, src/ops.c Patch 6.1.007 问题: Using ":filetype plugin off" when filetype plugins were never enabled causes an error message. (Yiu Wing) 解决方案: Use ":silent!" to avoid the error message. 相关文件: runtime/ftplugof.vim Patch 6.1.008 问题: The "%" command doesn't ignore \" inside a string, it's seen as the end of the string. (Ken Clark) 解决方案: Skip a double quote preceded by an odd number of backslashes. 相关文件: src/search.c Patch 6.1.009 问题: Vim crashes when using a huge number for the maxwid value in a statusline. (Robert M. Nowotniak) 解决方案: Check for an overflow that makes maxwid negative. 相关文件: src/buffer.c Patch 6.1.010 问题: Searching backwards for a question mark with "?\?" doesn't work. (Alan Isaac) Same problem in ":s?\??" and ":g?\??". 解决方案: Change the "\?" in a pattern to "?" when using "?" as delimiter. 相关文件: src/ex_cmds.c, src/ex_docmd.c, src/proto/regexp.pro, src/regexp.c, src/search.c, src/syntax.c, src/tag.c Patch 6.1.011 问题: XIM: doesn't work correctly when 'number' is set. Also, a focus problem when selecting candidates. 解决方案: Fix the XIM problems. (Yasuhiro Matsumoto) 相关文件: src/mbyte.c, src/screen.c Patch 6.1.012 问题: A system() call might fail if fread() does CR-LF to LF translation. 解决方案: Open the output file in binary mode. (Pavol Huhas) 相关文件: src/misc1.c Patch 6.1.013 问题: Win32: The default for 'printexpr' doesn't work when there are special characters in 'printdevice'. 解决方案: Add double quotes around the device name. (Mike Williams) 相关文件: runtime/doc/option.txt, src/option.c Patch 6.1.014 问题: An operator like "r" used in Visual block mode doesn't use 'virtualedit' when it's set to "block". 解决方案: Check for 'virtualedit' being active in Visual block mode when the operator was started. 相关文件: src/ex_docmd.c, src/globals.h, src/misc2.c, src/normal.c, src/ops.c, src/undo.c Patch 6.1.015 问题: After patch 6.1.014 can't compile with tiny features. (Christian J. Robinson) 解决方案: Add the missing define of virtual_op. 相关文件: src/vim.h Patch 6.1.016 (extra) 问题: Win32: Outputting Hebrew or Arabic text might have a problem with reversing. 解决方案: Replace the RevOut() function with ETO_IGNORELANGUAGE. (Ron Aaron) 相关文件: src/gui_w32.c Patch 6.1.017 问题: Cygwin: After patch 6.1.012 Still doesn't do binary file I/O. (Pavol Juhas) 解决方案: Define BINARY_FILE_IO for Cygwin. 相关文件: src/os_unix.h Patch 6.1.018 问题: Error message when using cterm highlighting. (Leonardo Di Lella) 解决方案: Remove a backslash before a question mark. 相关文件: runtime/syntax/cterm.vim Patch 6.1.019 (extra) 问题: Win32: File name is messed up when editing just a drive name. (Walter Briscoe) 解决方案: Append a NUL after the drive name. (Vince Negri) 相关文件: src/os_win32.c Patch 6.1.020 问题: col("'>") returns a huge number after using Visual line mode. 解决方案: Return the length of the line instead. 相关文件: src/eval.c Patch 6.1.021 (depends on patch 6.1.009) 问题: Vim crashes when using a huge number for the minwid value in a statusline. (Robert M. Nowotniak) 解决方案: Check for an overflow that makes minwid negative. 相关文件: src/buffer.c Patch 6.1.022 问题: Grabbing the status line above the command-line window works like the bottom status line was grabbed. (Jim Battle) 解决方案: Make it possible to grab the status line above the command-line window, so that it can be resized. 相关文件: src/ui.c Patch 6.1.023 (extra) 问题: VMS: running tests doesn't work properly. 解决方案: Adjust the makefile. (Zoltan Arpadffy) 相关文件: src/testdir/Make_vms.mms Patch 6.1.024 问题: When header files use a new syntax for declaring functions, Vim can't figure out missing prototypes properly. 解决方案: Accept braces around a function name. (M. Warner Losh) 相关文件: src/osdef.sh Patch 6.1.025 问题: Five messages for "vim --help" don't start with a capital. (Vlad Sandrini) 解决方案: Make the messages consistent. 相关文件: src/main.c Patch 6.1.026 问题: *.patch files are not recognized as diff files. In a script a "VAR=val" argument after "env" isn't ignored. PHP scripts are not recognized. 解决方案: Add *.patch for diff filetypes. Ignore "VAR=val". Recognize PHP scripts. (Roman Neuhauser) 相关文件: runtime/filetype.vim, runtime/scripts.vim Patch 6.1.027 问题: When 'foldcolumn' is non-zero, a special character that wraps to the next line disturbs the foldcolumn highlighting. (Yasuhiro Matsumoto) 解决方案: Only use the special highlighting when drawing text characters. 相关文件: src/screen.c Patch 6.1.028 问题: Client-server: When a --remote-expr fails, Vim still exits with status zero. 解决方案: Exit Vim with a non-zero status to indicate the --remote-expr failed. (Thomas Scott Urban) 相关文件: src/main.c Patch 6.1.029 问题: When 'encoding' is an 8-bit encoding other than "latin1", editing a utf-8 or other Unicode file uses the wrong conversion. (Jan Fedak) 解决方案: Don't use Unicode to latin1 conversion for 8-bit encodings other than "latin1". 相关文件: src/fileio.c Patch 6.1.030 问题: When CTRL-N is mapped in Insert mode, it is also mapped after CTRL-X CTRL-N, while it is not mapped after CTRL-X CTRL-F. (Kontra Gergely) 解决方案: Don't map CTRL-N after CTRL-X CTRL-N. Same for CTRL-P. 相关文件: src/getchar.c Patch 6.1.031 问题: Cygwin: Xxd could read a file in text mode instead of binary mode. 解决方案: Use "rb" or "rt" when needed. (Pavol Juhas) 相关文件: src/xxd/xxd.c Patch 6.1.032 问题: Can't specify a quickfix file without jumping to the first error. 解决方案: Add the ":cgetfile" command. (Yegappan Lakshmanan) 相关文件: runtime/doc/index.txt, runtime/doc/quickfix.txt, src/ex_cmds.h, src/quickfix.c Patch 6.1.033 问题: GUI: When the selection is lost and the Visual highlighting is changed to underlining, the cursor is left in a different position. (Christian Michon) 解决方案: Update the cursor position after redrawing the selection. 相关文件: src/ui.c Patch 6.1.034 问题: A CVS diff file isn't recognized as diff filetype. 解决方案: Skip lines starting with "? " before checking for an "Index:" line. 相关文件: runtime/scripts.vim Patch 6.1.035 (extra, depends on 6.1.016) 问题: Win32: Outputting Hebrew or Arabic text might have a problem with reversing on MS-Windows 95/98/ME. 解决方案: Restore the RevOut() function and use it in specific situations only. (Ron Aaron) 相关文件: src/gui_w32.c Patch 6.1.036 问题: This command may cause a crash: ":v/./,//-j". (Ralf Arens) 解决方案: Compute the right length of the regexp when it's empty. 相关文件: src/search.c Patch 6.1.037 问题: When 'lazyredraw' is set, pressing "q" at the hit-enter prompt causes an incomplete redraw and the cursor isn't positioned. (Lubomir Host) 解决方案: Overrule 'lazyredraw' when do_redraw is set. 相关文件: src/main.c, src/screen.c Patch 6.1.038 问题: Multi-byte: When a ":s" command contains a multibyte character where the trail byte is '~' the text is messed up. 解决方案: Properly skip multibyte characters in regtilde() (Muraoka Taro) 相关文件: src/regexp.c Patch 6.1.039 问题: When folds are defined and the file is changed outside of Vim, reloading the file doesn't update the folds. (Anders Schack-Nielsen) 解决方案: Recompute the folds after reloading the file. 相关文件: src/fileio.c Patch 6.1.040 问题: When changing directory for expanding a file name fails there is no error message. 解决方案: Give an error message for this situation. Don't change directory if we can't return to the original directory. 相关文件: src/diff.c, src/ex_docmd.c, src/globals.h, src/misc1.c, src/os_unix.c Patch 6.1.041 问题: ":mkvimrc" doesn't handle a mapping that has a leading space in the rhs. (Davyd Ondrejko) 解决方案: Insert a CTRL-V before the leading space. Also display leading and trailing white space in <> form. 相关文件: src/getchar.c, src/message.c Patch 6.1.042 问题: "vim -r" doesn't show all matches when 'wildignore' removes swap files. (Steve Talley) 解决方案: Keep all matching swap file names. 相关文件: src/memline.c Patch 6.1.043 问题: After patch 6.1.040 a few warnings are produced. 解决方案: Add a type cast to "char *" for mch_chdir(). (Axel Kielhorn) 相关文件: src/diff.c, src/ex_docmd.c.c, src/misc1.c, src/os_unix.c Patch 6.1.044 (extra) 问题: GUI: When using the find/replace dialog with text that contains a slash, an invalid substitute command is generated. On Win32 a find doesn't work when 'insertmode' is set. 解决方案: Escape slashes with a backslash. Make the Win32, Motif and GTK gui use common code for the find/replace dialog. Add the "match case" option for Motif and GTK. 相关文件: src/feature.h, src/proto/gui.pro, src/gui.c, src/gui.h, src/gui_motif.c, src/gui_gtk.c, src/gui_w48.c Patch 6.1.045 问题: In Visual mode, with lots of folds and 'scrolloff' set to 999, moving the cursor down near the end of the file causes the text to jump up and down. (Lubomir Host) 解决方案: Take into account that the cursor may be on the last line of a closed fold. 相关文件: src/move.c Patch 6.1.046 问题: X11 GUI: ":set lsp=2 gcr=n-v-i:hor1-blinkon0" draws a black rectangle. ":set lsp=2 gcr=n-v-i:hor10-blinkon0" makes the cursor disappear. (Nam SungHyun) 解决方案: Correctly compute the height of the horizontal cursor. 相关文件: src/gui_gtk_x11.c, src/gui_x11.c Patch 6.1.047 问题: When skipping commands after an error was encountered, expressions for ":if", ";elseif" and ":while" are still evaluated. 解决方案: Skip the expression after an error. (Servatius Brandt) 相关文件: src/ex_docmd.c Patch 6.1.048 问题: Unicode 3.2 changes were missing a few Hangul Jamo characters. 解决方案: Recognize more characters as composing characters. (Jungshik Shin) 相关文件: src/mbyte.c Patch 6.1.049 (extra) 问题: On a 32 bit display a valid color may cause an error message, because its pixel value is negative. (Chris Paulson-Ellis) 解决方案: Check for -11111 instead of the color being negative. Don't add one to the pixel value, -1 may be used for white. 相关文件: src/globals.h, src/gui.c, src/gui.h, src/gui_amiga.c, src/gui_athena.c, src/gui_beos.cc, src/gui_gtk_x11.c, src/gui_mac.c, src/gui_motif.c, src/gui_photon.c, src/gui_riscos.c, src/gui_w16.c, src/gui_w32.c, src/gui_w48.c, src/gui_x11.c, src/mbyte.c, src/syntax.c Patch 6.1.050 (depends on 6.1.049) 问题: After patch 6.1.049 the non-GUI version doesn't compile. 解决方案: Add an #ifdef FEAT_GUI. (Robert Stanton) 相关文件: src/syntax.c Patch 6.1.051 (depends on 6.1.044) 问题: Doesn't compile with GUI and small features. 解决方案: Adjust the #if for ga_append(). 相关文件: src/misc2.c Patch 6.1.052 问题: Unix: The executable() function doesn't work when the "which" command isn't available. 解决方案: Go through $PATH manually. Also makes it work for VMS. 相关文件: src/os_unix.c Patch 6.1.053 问题: When 'sessionoptions' contains "globals", or "localoptions" and an option value contains a line break, the resulting script is wrong. 解决方案: Use "\n" and "\r" for a line break. (Srinath Avadhanula) 相关文件: src/eval.c Patch 6.1.054 问题: GUI: A mouse click is not recognized at the more prompt, even when 'mouse' includes 'r'. 解决方案: Recognize a mouse click at the more prompt. Also accept a mouse click in the last line in the GUI. Add "ml" entry in 'mouseshape'. 相关文件: src/gui.c, src/message.c, src/misc1.c, src/misc2.c, src/option.c, src/structs.h Patch 6.1.055 问题: When editing a compressed file, Vim will inspect the contents to guess the filetype. 解决方案: Don't source scripts.vim for .Z, .gz, .bz2, .zip and .tgz files. 相关文件: runtime/filetype.vim, runtime/plugin/gzip.vim Patch 6.1.056 问题: Loading the Syntax menu can take quite a bit of time. 解决方案: Add the "skip_syntax_sel_menu" variable. When it's defined the available syntax files are not in the Syntax menu. 相关文件: runtime/doc/gui.txt, runtime/menu.vim Patch 6.1.057 问题: An ESC inside a mapping doesn't work as documented when 'insertmode' is set, it does go from Visual or Normal mode to Insert mode. (Benji Fisher) 解决方案: Make it work as documented. 相关文件: src/normal.c Patch 6.1.058 问题: When there is a closed fold just above the first line in the window, using CTRL-X CTRL-Y in Insert mode will show only one line of the fold. (Alexey Marinichev) 解决方案: Correct the topline by putting it at the start of the fold. 相关文件: src/move.c Patch 6.1.059 问题: ":redir > ~/file" doesn't work. (Stephen Rasku) 解决方案: Expand environment variables in the ":redir >" argument. 相关文件: src/ex_docmd.c Patch 6.1.060 问题: When 'virtualedit' is set and 'selection' is "exclusive", deleting a character just before a tab changes the tab into spaces. Undo doesn't restore the tab. (Helmut Stiegler) 解决方案: Don't replace the tab by spaces when it's not needed. Correctly save the line before it's changed. 相关文件: src/ops.c Patch 6.1.061 问题: When 'virtualedit' is set and 'selection' is "exclusive", a Visual selection that ends just after a tab doesn't include that tab in the highlighting. (Helmut Stiegler) 解决方案: Use a different way to exclude the character under the cursor. 相关文件: src/screen.c Patch 6.1.062 问题: The "man" filetype plugin doesn't work properly on Solaris 5. 解决方案: Use a different way to detect that "man -s" should be used. (Hugh Sasse) 相关文件: runtime/ftplugin/man.vim Patch 6.1.063 问题: Java indenting doesn't work properly. 解决方案: Ignore comments when checking if the indent doesn't increase after a "}". 相关文件: runtime/indent/java.vim Patch 6.1.064 问题: The URLs that the netrw plugin recognized for ftp and rcp did not conform to the standard method://[user@]host[:port]/path. 解决方案: Use ftp://[user@]host[[:#]port]/path, which supports both the new and the previous style. Also added a bit of dav/cadaver support. (Charles Campbell) 相关文件: runtime/plugin/netrw.vim Patch 6.1.065 问题: VMS: The colorscheme, keymap and compiler menus are not filled in. 解决方案: Ignore case when looking for ".vim" files. (Coen Engelbarts) 相关文件: runtime/menu.vim Patch 6.1.066 (extra) 问题: When calling system() in a plugin reading stdin hangs. 解决方案: Don't set the terminal to RAW mode when it wasn't in RAW mode before the system() call. 相关文件: src/os_amiga.c, src/os_msdos.c, src/os_riscos.c, src/os_unix.c, src/os_win16.c, src/os_win32.c Patch 6.1.067 问题: ":set viminfo+=f0" is not working. (Benji Fisher) 解决方案: Check the "f" flag instead of "'" in 'viminfo'. 相关文件: src/mark.c Patch 6.1.068 问题: When a file is reloaded after it was changed outside of Vim, diff mode isn't updated. (Michael Naumann) 解决方案: Invalidate the diff info so that it's updated when needed. 相关文件: src/fileio.c Patch 6.1.069 问题: When 'showmatch' is set and "$" is in 'cpoptions', using "C}<Esc>" may forget to remove the "$". (Preben Guldberg) 解决方案: Restore dollar_vcol after displaying the matching cursor position. 相关文件: src/search.c Patch 6.1.070 (depends on 6.1.060) 问题: Compiler warning for signed/unsigned mismatch. (Mike Williams) 解决方案: Add a typecast to int. 相关文件: src/ops.c Patch 6.1.071 问题: When 'selection' is exclusive, g CTRL-G in Visual mode counts one character too much. (David Necas) 解决方案: Subtract one from the end position. 相关文件: src/ops.c Patch 6.1.072 问题: When a file name in a tags file starts with http:// or something else for which there is a BufReadCmd autocommand, the file isn't opened anyway. 解决方案: Check if there is a matching BufReadCmd autocommand and try to open the file. 相关文件: src/fileio.c, src/proto/fileio.pro, src/tag.c Patch 6.1.073 (extra) 问题: BC5: Can't easily specify a tiny, small, normal, big or huge version. 解决方案: Allow selecting the version with the FEATURES variable. (Ajit Thakkar) 相关文件: src/Make_bc5.mak Patch 6.1.074 问题: When 'cdpath' includes "../..", changing to a directory in which we currently already are doesn't work. ff_check_visited() adds the directory both when using it as the root for searching and for the actual matches. (Stephen Rasku) 解决方案: Use a separate list for the already searched directories. 相关文件: src/misc2.c Patch 6.1.075 (depends on 6.1.072) 问题: Can't compile fileio.c on MS-Windows. 解决方案: Add a declaration for the "p" pointer. (Madoka Machitani) 相关文件: src/fileio.c Patch 6.1.076 (extra) 问题: Macintosh: explorer plugin doesn't work on Mac Classic. IME doesn't work. Dialog boxes don't work on Mac OS X 解决方案: Fix explorer plugin and key modifiers. (Axel Kielhorn) Fix IME support. (Muraoka Taro) Disable dialog boxes. (Benji Fisher) 相关文件: src/edit.c, src/feature.h, src/gui_mac.c, src/os_mac.c Patch 6.1.077 问题: On a Debian system with ACL linking fails. (Lubomir Host) 解决方案: When the "acl" library is used, check if the "attr" library is present and use it. 相关文件: src/auto/configure, src/configure.in, src/link.sh Patch 6.1.078 问题: When using 'foldmethod' "marker" and the end marker appears before the start marker in the file, no fold is found. (Nazri Ramliy) 解决方案: Don't let the fold depth go negative. 相关文件: src/fold.c Patch 6.1.079 问题: When using "s" in Visual block mode with 'virtualedit' set, when the selected block is after the end of some lines the wrong text is inserted and some lines are skipped. (Servatius Brandt) 解决方案: Insert the right text and extend short lines. 相关文件: src/ops.c Patch 6.1.080 问题: When using gcc with /usr/local already in the search path, adding it again causes problems. 解决方案: Adjust configure.in to avoid adding /usr/local/include and /usr/local/lib when using GCC and they are already used. (Johannes Zellner) 相关文件: src/auto/configure, src/configure.in Patch 6.1.081 问题: ":help CTRL-\_CTRL-N" doesn't work. (Christian J. Robinson) 解决方案: Double the backslash to avoid the special meaning of "\_". 相关文件: src/ex_cmds.c Patch 6.1.082 问题: On MS-Windows the vimrc_example.vim script is sourced and then mswin.vim. This enables using select mode, but since "p" is mapped it doesn't replace the selection. 解决方案: Remove the mapping of "p" from vimrc_example.vim, it's obsolete. (Vlad Sandrini) 相关文件: runtime/vimrc_example.vim Patch 6.1.083 问题: When $LANG is "sk" or "sk_sk", the Slovak menu file isn't found. (Martin Lacko) 解决方案: Guess the right menu file based on the system. 相关文件: runtime/lang/menu_sk_sk.vim Patch 6.1.084 (depends on 6.1.080) 问题: "include" and "lib" are mixed up when checking the directories gcc already searches. 解决方案: Swap the variable names. (SunHo Kim) 相关文件: src/auto/configure, src/configure.in Patch 6.1.085 问题: When using CTRL-O CTRL-\ CTRL-N from Insert mode, the displayed mode "(insert)" isn't removed. (Benji Fisher) 解决方案: Clear the command line. 相关文件: src/normal.c Patch 6.1.086 (depends on 6.1.049) 问题: The guifg color for CursorIM doesn't take effect. 解决方案: Use the foreground color when it's defined. (Muraoka Taro) 相关文件: src/gui.c Patch 6.1.087 问题: A thesaurus with Japanese characters has problems with characters in different word classes. 解决方案: Only separate words with single-byte non-word characters. (Muraoka Taro) 相关文件: src/edit.c Patch 6.1.088 (extra) 问题: Win32: no debugging info is generated. Tags file excludes .cpp files. 解决方案: Add "/map" to compiler flags. Add "*.cpp" to ctags command. (Muraoka Taro) 相关文件: src/Make_mvc.mak Patch 6.1.089 问题: On BSDI systems there is no ss_sp field in stack_t. (Robert Jan) 解决方案: Use ss_base instead. 相关文件: src/auto/configure, src/configure.in, src/config.h.in, src/os_unix.c Patch 6.1.090 问题: CTRL-F gets stuck when 'scrolloff' is non-zero and there is a mix of long wrapping lines and a non-wrapping line. 解决方案: Check that CTRL-F scrolls at least one line. 相关文件: src/move.c Patch 6.1.091 问题: GTK: Can't change preeditstate without setting 'imactivatekey'. 解决方案: Add some code to change preeditstate for OnTheSpot. (Yasuhiro Matsumoto) 相关文件: src/mbyte.c Patch 6.1.092 问题: ":mapclear <buffer>" doesn't work. (Srikanth Adayapalam) 解决方案: Allow an argument for ":mapclear". 相关文件: src/ex_cmds.h Patch 6.1.093 (extra) 问题: Mac and MS-Windows GUI: when scrolling while ":s" is working the results can be messed up, because the cursor is moved. 解决方案: Disallow direct scrolling when not waiting for a character. 相关文件: src/gui_mac.c, src/gui_w16.c, src/gui_w32.c, src/gui_w48.c Patch 6.1.094 问题: Cygwin: Passing a file name that has backslashes isn't handled very well. 解决方案: Convert file name arguments to Posix. (Chris Metcalf) 相关文件: src/main.c Patch 6.1.095 问题: When using signs can free an item on the stack. Overruling sign colors doesn't work. (Srikanth Sankaran) 解决方案: Don't free the item on the stack. Use NULL instead of "none" for the value of the color. 相关文件: src/gui_x11.c Patch 6.1.096 问题: When erasing the right half of a double-byte character, it may cause further characters to be erased. (Yasuhiro Matsumoto) 解决方案: Make sure only one character is erased. 相关文件: src/screen.c Patch 6.1.097 (depends on 6.1.090) 问题: When 'scrolloff' is set to a huge value, CTRL-F at the end of the file scrolls one line. (Lubomir Host) 解决方案: Don't scroll when CTRL-F detects the end-of-file. 相关文件: src/move.c Patch 6.1.098 问题: MS-Windows: When the xxd program is under "c:\program files" the "Convert to Hex" menu doesn't work. (Brian Mathis) 解决方案: Put the path to xxd in double quotes. 相关文件: runtime/menu.vim Patch 6.1.099 问题: Memory corrupted when closing a fold with more than 99999 lines. 解决方案: Allocate more space for the fold text. (Walter Briscoe) 相关文件: src/eval.c Patch 6.1.100 (extra, depends on 6.1.088) 问题: Win32: VC5 and earlier don't support the /mapinfo option. 解决方案: Add "/mapinfo" only when "MAP=lines" is specified. (Muraoka Taro) 相关文件: src/Make_mvc.mak Patch 6.1.101 问题: After using ":options" the tabstop of a new window is 15. Entry in ":options" window for 'autowriteall' is wrong. (Antoine J Mechelynck) Can't insert a space in an option value. 解决方案: Use ":setlocal" instead of ":set". Change "aw" to "awa". Don't map space in Insert mode. 相关文件: runtime/optwin.vim Patch 6.1.102 问题: Unprintable and multibyte characters in a statusline item are not truncated correctly. (Yasuhiro Matsumoto) 解决方案: Count the width of characters instead of the number of bytes. 相关文件: src/buffer.c Patch 6.1.103 问题: A function returning from a while loop, with 'verbose' set to 12 or higher, doesn't mention the return value. A function with the 'abort' attribute may return -1 while the verbose message says something else. 解决方案: Move the verbose message about returning from a function to call_func(). (Servatius Brandt) 相关文件: src/eval.c Patch 6.1.104 问题: GCC 3.1 appears to have an optimizer problem that makes test 3 crash. 解决方案: For GCC 3.1 add -fno-strength-reduce to avoid the optimizer bug. Filter out extra info from "gcc --version". 相关文件: src/auto/configure, src/configure.in Patch 6.1.105 问题: Win32: The default for 'shellpipe' doesn't redirect stderr. (Dion Nicolaas) 解决方案: Redirect stderr, depending on the shell (like for 'shellredir'). 相关文件: src/option.c Patch 6.1.106 问题: The maze program crashes. 解决方案: Change "11" to "27" and it works. (Greg Roelofs) 相关文件: runtime/macros/maze/mazeansi.c Patch 6.1.107 问题: When 'list' is set the current line in the error window may be displayed wrong. (Muraoka Taro) 解决方案: Don't continue the line after the $ has been displayed and the rightmost column is reached. 相关文件: src/screen.c Patch 6.1.108 问题: When interrupting a filter command such as "!!sleep 20" the file becomes read-only. (Mark Brader) 解决方案: Only set the read-only flag when opening a buffer is interrupted. When the shell command was interrupted, read the output that was produced so far. 相关文件: src/ex_cmds.c, src/fileio.c Patch 6.1.109 问题: When 'eadirection' is "hor", using CTRL-W = doesn't equalize the window heights. (Roman Neuhauser) 解决方案: Ignore 'eadirection' for CTRL-W = 相关文件: src/window.c Patch 6.1.110 问题: When using ":badd file" when "file" is already present but not listed, it stays unlisted. (David Frey) 解决方案: Set 'buflisted'. 相关文件: src/buffer.c Patch 6.1.111 问题: It's not possible to detect using the Unix sources on Win32 or Mac. 解决方案: Add has("macunix") and has("win32unix"). 相关文件: runtime/doc/eval.txt, src/eval.c Patch 6.1.112 问题: When using ":argdo", ":bufdo" or ":windo", CTRL-O doesn't go to the cursor position from before this command but every position where the argument was executed. 解决方案: Only remember the cursor position from before the ":argdo", ":bufdo" and ":windo". 相关文件: src/ex_cmds2.c, src/mark.c Patch 6.1.113 问题: ":bufdo bwipe" only wipes out half the buffers. (Roman Neuhauser) 解决方案: Decide what buffer to go to next before executing the command. 相关文件: src/ex_cmds2.c Patch 6.1.114 问题: ":python import vim", ":python vim.current.buffer[0:0] = []" gives a lalloc(0) error. (Chris Southern) 解决方案: Don't allocate an array when it's size is zero. 相关文件: src/if_python.c Patch 6.1.115 问题: "das" on the white space at the end of a paragraph does not delete the "." the sentence ends with. 解决方案: Don't exclude the last character when it is not white space. 相关文件: src/search.c Patch 6.1.116 问题: When 'endofline' is changed while 'binary' is set a file should be considered modified. (Olaf Buddenhagen) 解决方案: Remember the 'eol' value when editing started and consider the file changed when the current value is different and 'binary' is set. Also fix that the window title isn't updated when 'ff' or 'bin' changes. 相关文件: src/option.c, src/structs.h Patch 6.1.117 问题: Small problem with editing a file over ftp: and with Cygwin. 解决方案: Remove a dot from a ":normal" command. Use "cygdrive" where appropriate. (Charles Campbell) 相关文件: runtime/plugin/netrw.vim Patch 6.1.118 问题: When a file in diff mode is reloaded because it changed outside of Vim, other windows in diff mode are not always updated. (Michael Naumann) 解决方案: After reloading a file in diff mode mark all windows in diff mode for redraw. 相关文件: src/diff.c Patch 6.1.119 (extra) 问题: With the Sniff interface, using Sniff 4.0.X on HP-UX, there may be a crash when connecting to Sniff. 解决方案: Initialize sniff_rq_sep such that its value can be changed. (Martin Egloff) 相关文件: src/if_sniff.c Patch 6.1.120 (depends on 6.1.097) 问题: When 'scrolloff' is non-zero and there are folds, CTRL-F at the end of the file scrolls part of a closed fold. (Lubomir Host) 解决方案: Adjust the first line to the start of a fold. 相关文件: src/move.c Patch 6.1.121 (depends on 6.1.098) 问题: When starting Select mode from Insert mode, then using the Paste menu entry, the cursor is left before the last pasted character. (Mario Schweigler) 解决方案: Set the cursor for Insert mode one character to the right. 相关文件: runtime/menu.vim Patch 6.1.122 问题: ":file name" creates a new buffer to hold the old buffer name, which becomes the alternate file. This buffer is unexpectedly listed. 解决方案: Create the buffer for the alternate name unlisted. 相关文件: src/ex_cmds.c Patch 6.1.123 问题: A ":match" command with more than one argument doesn't report an error. 解决方案: Check for extra characters. (Servatius Brandt) 相关文件: src/ex_docmd.c Patch 6.1.124 问题: When trying to exit and there is a hidden buffer that had 'eol' off and 'bin' set exiting isn't possible. (John McGowan) 解决方案: Set b_start_eol when clearing the buffer. 相关文件: src/buffer.c Patch 6.1.125 问题: Explorer plugin asks for saving a modified buffer even when it's open in another window as well. 解决方案: Count the number of windows using the buffer. 相关文件: runtime/plugin/explorer.vim Patch 6.1.126 问题: Adding the choices in the syntax menu is consuming much of the startup time of the GUI while it's not often used. 解决方案: Only add the choices when the user wants to use them. 相关文件: Makefile, runtime/makemenu.vim, runtime/menu.vim, runtime/synmenu.vim, src/Makefile Patch 6.1.127 问题: When using "--remote file" and the server has 'insertmode' set, commands are inserted instead of being executed. (Niklas Volbers) 解决方案: Go to Normal mode again after the ":drop" command. 相关文件: src/main.c Patch 6.1.128 问题: The expression "input('very long prompt')" puts the cursor in the wrong line (column is OK). 解决方案: Add the wrapped lines to the indent. (Yasuhiro Matsumoto) 相关文件: src/ex_getln.c Patch 6.1.129 问题: On Solaris editing "file/" and then "file" results in using the same buffer. (Jim Battle) 解决方案: Before using stat(), check that there is no illegal trailing slash. 相关文件: src/auto/configure, src/config.h.in, src/configure.in, src/macros.h src/misc2.c, src/proto/misc2.pro Patch 6.1.130 问题: The documentation for some of the 'errorformat' items is unclear. 解决方案: Add more examples and explain hard to understand items. (Stefan Roemer) 相关文件: runtime/doc/quickfix.txt Patch 6.1.131 问题: X11 GUI: when expanding a CSI byte in the input stream to K_CSI, the CSI byte itself isn't copied. 解决方案: Copy the CSI byte. 相关文件: src/gui_x11.c Patch 6.1.132 问题: Executing a register in Ex mode may cause commands to be skipped. (John McGowan) 解决方案: In Ex mode use an extra check if the register contents was consumed, to avoid input goes into the typeahead buffer. 相关文件: src/ex_docmd.c Patch 6.1.133 问题: When drawing double-wide characters in the statusline, may clear half of a character. (Yasuhiro Matsumoto) 解决方案: Force redraw of the next character by setting the attributes instead of putting a NUL in ScreenLines[]. Do put a NUL in ScreenLines[] when overwriting half of a double-wide character. 相关文件: src/screen.c Patch 6.1.134 问题: An error for a trailing argument of ":match" should not be given after ":if 0". (Servatius Brandt) 解决方案: Only do the check when executing commands. 相关文件: src/ex_docmd.c Patch 6.1.135 问题: Passing a command to the shell that includes a newline always has a backslash before the newline. 解决方案: Remove one backslash before the newline. (Servatius Brandt) 相关文件: src/ex_docmd.c Patch 6.1.136 问题: When $TERM is "linux" the default for 'background' is "dark", even though the GUI uses a light background. (Hugh Allen) 解决方案: Don't mark the option as set when defaulting to "dark" for the linux console. Also reset 'background' to "light" when the GUI has a light background. 相关文件: src/option.c Patch 6.1.137 问题: Converting to HTML has a clumsy way of dealing with tabs which may change the highlighting. 解决方案: Replace tabs with spaces after converting a line to HTML. (Preben Guldberg) 相关文件: runtime/syntax/2html.vim Patch 6.1.138 (depends on 6.1.126) 问题: Adding extra items to the Syntax menu can't be done when the "Show individual choices" menu is used. 解决方案: Use ":runtime!" instead of ":source", so that all synmenu.vim files in the runtime path are loaded. (Servatius Brandt) Also fix that a translated menu can't be removed. 相关文件: runtime/menu.vim Patch 6.1.139 问题: Cygwin: PATH_MAX is not defined. 解决方案: Include limits.h. (Dan Sharp) 相关文件: src/main.c Patch 6.1.140 问题: Cygwin: ":args `ls *.c`" does not work if the shell command produces CR NL line separators. 解决方案: Remove the CR characters ourselves. (Pavol Juhas) 相关文件: src/os_unix.c Patch 6.1.141 问题: ":wincmd gx" may cause problems when mixed with other commands. ":wincmd c" doesn't close the window immediately. (Benji Fisher) 解决方案: Pass the extra command character directly instead of using the stuff buffer and call ex_close() directly. 相关文件: src/ex_docmd.c, src/normal.c, src/proto/normal.pro, src/proto/window.pro, src/window.c Patch 6.1.142 问题: Defining paragraphs without a separating blank line isn't possible. Paragraphs can't be formatted automatically. 解决方案: Allow defining paragraphs with lines that end in white space. Added the 'w' and 'a' flags in 'formatoptions'. 相关文件: runtime/doc/change.txt, src/edit.c, src/misc1.c, src/normal.c, src/option.h, src/ops.c, src/proto/edit.pro, src/proto/ops.pro, src/vim.h Patch 6.1.143 (depends on 6.1.142) 问题: Auto formatting near the end of the file moves the cursor to a wrong position. In Insert mode some lines are made one char too narrow. When deleting a line undo might not always work properly. 解决方案: Don't always move to the end of the line in the last line. Don't position the cursor past the end of the line in Insert mode. After deleting a line save the cursor line for undo. 相关文件: src/edit.c, src/ops.c, src/normal.c Patch 6.1.144 问题: Obtaining the size of a line in screen characters can be wrong. A pointer may wrap around zero. 解决方案: In win_linetabsize() check for a MAXCOL length argument. (Jim Dunleavy) 相关文件: src/charset.c Patch 6.1.145 问题: GTK: Drag&drop with more than 3 files may cause a crash. (Mickael Marchand) 解决方案: Rewrite the code that parses the received list of files to be more robust. 相关文件: src/charset.c, src/gui_gtk_x11.c Patch 6.1.146 问题: MS-Windows: When $HOME is constructed from $HOMEDRIVE and $HOMEPATH, it is not used for storing the _viminfo file. (Normal Diamond) 解决方案: Set $HOME with the value obtained from $HOMEDRIVE and $HOMEPATH. 相关文件: src/misc1.c Patch 6.1.147 (extra) 问题: MS-Windows: When a dialog has no default button, pressing Enter ends it anyway and all buttons are selected. 解决方案: Don't end a dialog when there is no default button. Don't select all button when there is no default. (Vince Negri) 相关文件: src/gui_w32.c Patch 6.1.148 (extra) 问题: MS-Windows: ACL is not properly supported. 解决方案: Add an access() replacement that also works for ACL. (Mike Williams) 相关文件: runtime/doc/editing.txt, src/os_win32.c Patch 6.1.149 (extra) 问题: MS-Windows: Can't use diff mode from the file explorer. 解决方案: Add a "diff with Vim" context menu entry. (Dan Sharp) 相关文件: GvimExt/gvimext.cpp, GvimExt/gvimext.h Patch 6.1.150 问题: OS/2, MS-Windows and MS-DOS: When 'shellslash' is set getcwd() still uses backslash. (Yegappan Lakshmanan) 解决方案: Adjust slashes in getcwd(). 相关文件: src/eval.c Patch 6.1.151 (extra) 问题: Win32: The NTFS substream isn't copied. 解决方案: Copy the substream when making a backup copy. (Muraoka Taro) 相关文件: src/fileio.c, src/os_win32.c, src/proto/os_win32.pro Patch 6.1.152 问题: When $LANG is iso8859-1 translated menus are not used. 解决方案: Change iso8859 to iso_8859. 相关文件: runtime/menu.vim Patch 6.1.153 问题: Searching in included files may search recursively when the path starts with "../". (Sven Berkvens-Matthijsse) 解决方案: Compare full file names, use inode/device when possible. 相关文件: src/search.c Patch 6.1.154 (extra) 问题: DJGPP: "vim -h" leaves the cursor in a wrong position. 解决方案: Don't position the cursor using uninitialized variables. (Jim Dunleavy) 相关文件: src/os_msdos.c Patch 6.1.155 问题: Win32: Cursor may sometimes disappear in Insert mode. 解决方案: Change "hor10" in 'guicursor' to "hor15". (Walter Briscoe) 相关文件: src/option.c Patch 6.1.156 问题: Conversion between DBCS and UCS-2 isn't implemented cleanly. 解决方案: Clean up a few things. 相关文件: src/mbyte.c, src/structs.h Patch 6.1.157 问题: 'hlsearch' highlights only the second comma in ",,,,," with "/,\@<=[^,]*". (Preben Guldberg) 解决方案: Also check for an empty match to start just after a previous match. 相关文件: src/screen.c Patch 6.1.158 问题: "zs" and "ze" don't work correctly with ":set nowrap siso=1". (Preben Guldberg) 解决方案: Take 'siso' into account when computing the horizontal scroll position for "zs" and "ze". 相关文件: src/normal.c Patch 6.1.159 问题: When expanding an abbreviation that includes a multibyte character too many characters are deleted. (Andrey Urazov) 解决方案: Delete the abbreviation counting characters instead of bytes. 相关文件: src/getchar.c Patch 6.1.160 问题: ":$read file.gz" doesn't work. (Preben Guldberg) 解决方案: Don't use the '[ mark after it has become invalid. 相关文件: runtime/plugin/gzip.vim Patch 6.1.161 (depends on 6.1.158) 问题: Warning for signed/unsigned compare. Can set 'siso' to a negative value. (Mike Williams) 解决方案: Add a typecast. Add a check for 'siso' being negative. 相关文件: src/normal.c, src/option.c Patch 6.1.162 问题: Python interface: Didn't initialize threads properly. 解决方案: Call PyEval_InitThreads() when starting up. 相关文件: src/if_python.c Patch 6.1.163 问题: Win32: Can't compile with Python after 6.1.162. 解决方案: Dynamically load PyEval_InitThreads(). (Dan Sharp) 相关文件: src/if_python.c Patch 6.1.164 问题: If 'modifiable' is off, converting to xxd fails and 'filetype' is changed to "xxd" anyway. 解决方案: Don't change 'filetype' when conversion failed. 相关文件: runtime/menu.vim Patch 6.1.165 问题: Making changes in several lines and then a change in one of these lines that splits it in two or more lines, undo information was corrupted. May cause a crash. (Dave Fishburn) 解决方案: When skipping to save a line for undo because it was already saved, move it to become the last saved line, so that when the command changes the line count other saved lines are not involved. 相关文件: src/undo.c Patch 6.1.166 问题: When 'autoindent' is set and mswin.vim has been sourced, pasting with CTRL-V just after auto-indenting removes the indent. (Shlomi Fish) 解决方案: First insert an "x" and delete it again, so that the auto-indent remains. 相关文件: runtime/mswin.vim Patch 6.1.167 问题: When giving a negative argument to ":retab" strange things start happening. (Hans Ginzel) 解决方案: Check for a negative value. 相关文件: src/ex_cmds.c Patch 6.1.168 问题: Pressing CTRL-C at the hit-enter prompt doesn't end the prompt. 解决方案: Make CTRL-C stop the hit-enter prompt. 相关文件: src/message.c Patch 6.1.169 问题: bufexists() finds a buffer by using the name of a symbolic link to it, but bufnr() doesn't. (Yegappan Lakshmanan) 解决方案: When bufnr() can't find a buffer, try using the same method as bufexists(). 相关文件: src/eval.c Patch 6.1.170 问题: Using ":mksession" uses the default session file name, but "vim -S" doesn't. (Hans Ginzel) 解决方案: Use the default session file name if "-S" is the last command line argument or another option follows. 相关文件: runtime/doc/starting.txt, src/main.c Patch 6.1.171 问题: When opening a line just above a closed fold with "O" and the comment leader is automatically inserted, the cursor is displayed in the first column. (Sung-Hyun Nam) 解决方案: Update the flag that indicates the cursor is in a closed fold. 相关文件: src/misc1.c Patch 6.1.172 问题: Command line completion of ":tag /pat" does not show the same results as the tags the command actually finds. (Gilles Roy) 解决方案: Don't modify the pattern to make it a regexp. 相关文件: src/ex_getln.c, src/tag.c Patch 6.1.173 问题: When using remote control to edit a position in a file and this file is the current buffer and it's modified, the window is split and the ":drop" command fails. 解决方案: Don't split the window, keep editing the same buffer. Use the ":drop" command in VisVim to avoid the problem there. 相关文件: src/ex_cmds.c, src/ex_cmds2.c, src/proto/ex_cmds2.pro, VisVim/Commands.cpp Patch 6.1.174 问题: It is difficult to know in a script whether an option not only exists but really works. 解决方案: Add "exists('+option')". 相关文件: runtime/doc/eval.txt, src/eval.c Patch 6.1.175 问题: When reading commands from a pipe and a CTRL-C is pressed, Vim will hang. (Piet Delport) 解决方案: Don't keep reading characters to clear typeahead when an interrupt was detected, stop when a single CTRL-C is read. 相关文件: src/getchar.c, src/ui.c Patch 6.1.176 问题: When the stack limit is very big a false out-of-stack error may be detected. 解决方案: Add a check for overflow of the stack limit computation. (Jim Dunleavy) 相关文件: src/os_unix.c Patch 6.1.177 (depends on 6.1.141) 问题: ":wincmd" does not allow a following command. (Gary Johnson) 解决方案: Check for a following " | cmd". Also give an error for trailing characters. 相关文件: src/ex_docmd.c Patch 6.1.178 问题: When 'expandtab' is set "r<C-V><Tab>" still expands the Tab. (Bruce deVisser) 解决方案: Replace with a literal Tab. 相关文件: src/normal.c Patch 6.1.179 (depends on 6.1.091) 问题: When using X11R5 XIMPreserveState is undefined. (Albert Chin) 解决方案: Include the missing definitions. 相关文件: src/mbyte.c Patch 6.1.180 问题: Use of the GUI code for forking is inconsistent. 解决方案: Define MAY_FORK and use it for later #ifdefs. (Ben Fowlwer) 相关文件: src/gui.c Patch 6.1.181 问题: If the terminal doesn't wrap from the last char in a line to the next line, the last column is blanked out. (Peter Karp) 解决方案: Don't output a space to mark the wrap, but the same character again. 相关文件: src/screen.c Patch 6.1.182 (depends on 6.1.142) 问题: It is not possible to auto-format comments only. (Moshe Kaminsky) 解决方案: When the 'a' and 'c' flags are in 'formatoptions' only auto-format comments. 相关文件: runtime/doc/change.txt, src/edit.c Patch 6.1.183 问题: When 'fencs' is empty and 'enc' is utf-8, reading a file with illegal bytes gives "CONVERSION ERROR" even though no conversion is done. 'readonly' is set, even though writing the file results in an unmodified file. 解决方案: For this specific error use "ILLEGAL BYTE" and don't set 'readonly'. 相关文件: src/fileio.c Patch 6.1.184 (extra) 问题: The extra mouse buttons found on some mice don't work. 解决方案: Support two extra buttons for MS-Windows. (Michael Geddes) 相关文件: runtime/doc/term.txt, src/edit.c, src/ex_getln.c, src/gui.c, src/gui_w32.c, src/gui_w48.c, src/keymap.h, src/message.c, src/misc1.c, src/misc2.c, src/normal.c, src/vim.h Patch 6.1.185 (depends on 6.1.182) 问题: Can't compile without +comments feature. 解决方案: Add #ifdef FEAT_COMMENTS. (Christian J. Robinson) 相关文件: src/edit.c Patch 6.1.186 (depends on 6.1.177) 问题: ":wincmd" does not allow a following comment. (Aric Blumer) 解决方案: Check for a following double quote. 相关文件: src/ex_docmd.c Patch 6.1.187 问题: Using ":doarg" with 'hidden' set and the current file is the only argument and was modified gives an error message. (Preben Guldberg) 解决方案: Don't try re-editing the same file. 相关文件: src/ex_cmds2.c Patch 6.1.188 (depends on 6.1.173) 问题: Unused variable in the small version. 解决方案: Move the declaration for "p" inside #ifdef FEAT_LISTCMDS. 相关文件: src/ex_cmds2.c Patch 6.1.189 问题: inputdialog() doesn't work when 'c' is in 'guioptions'. (Aric Blumer) 解决方案: Fall back to the input() function in this situation. 相关文件: src/eval.c Patch 6.1.190 (extra) 问题: VMS: doesn't build with GTK GUI. Various other problems. 解决方案: Fix building for GTK. Improved Perl, Python and TCL support. Improved VMS documentation. (Zoltan Arpadffy) Added Vimtutor for VMS (T. R. Wyant) 相关文件: runtime/doc/os_vms.txt, src/INSTALLvms.txt, src/gui_gtk_f.h, src/if_tcl.c, src/main.c, src/gui_gtk_vms.h, src/Make_vms.mms, src/os_vms.opt, src/proto/if_tcl.pro, vimtutor.com, src/testdir/Make_vms.mms Patch 6.1.191 问题: When using "vim -s script" and redirecting the output, the delay for the "Output is not to a terminal" warning slows Vim down too much. 解决方案: Don't delay when reading commands from a script. 相关文件: src/main.c Patch 6.1.192 问题: ":diffsplit" doesn't add "hor" to 'scrollopt'. (Gary Johnson) 解决方案: Add "hor" to 'scrollopt' each time ":diffsplit" is used. 相关文件: src/diff.c, src/main.c Patch 6.1.193 问题: Crash in in_id_list() for an item with a "containedin" list. (Dave Fishburn) 解决方案: Check for a negative syntax id, used for keywords. 相关文件: src/syntax.c Patch 6.1.194 问题: When "t_ti" is set but it doesn't cause swapping terminal pages, "ZZ" may cause the shell prompt to appear on top of the file-write message. 解决方案: Scroll the text up in the Vim page before swapping to the terminal page. (Michael Schroeder) 相关文件: src/os_unix.c Patch 6.1.195 问题: The quickfix and preview windows always keep their height, while other windows can't fix their height. 解决方案: Add the 'winfixheight' option, so that a fixed height can be specified for any window. Also fix that the wildmenu may resize a one-line window to a two-line window if 'ls' is zero. 相关文件: runtime/doc/options.txt, runtime/optwin.vim, src/ex_cmds.c, src/ex_getln.c, src/globals.h, src/option.c, src/quickfix.c, src/screen.c, src/structs.h, src/window.c Patch 6.1.196 (depends on 6.1.084) 问题: On Mac OS X 10.2 generating osdef.h fails. 解决方案: Add -no-cpp-precomp to avoid using precompiled header files, which disables printing the search path. (Ben Fowler) 相关文件: src/auto/configure, src/configure.in Patch 6.1.197 问题: ":help <C-V><C-\><C-V><C-N>" (resulting in <1c><0e>) gives an error message. (Servatius Brandt) 解决方案: Double the backslash in "CTRL-\". 相关文件: src/ex_cmds.c Patch 6.1.198 (extra) (depends on 6.1.076) 问题: Mac OS X: Dialogues don't work. 解决方案: Fix a crashing problem for some GUI dialogues. Fix a problem when saving to a new file from the GUI. (Peter Cucka) 相关文件: src/feature.h, src/gui_mac.c Patch 6.1.199 问题: 'guifontwide' doesn't work on Win32. 解决方案: Output each wide character separately. (Michael Geddes) 相关文件: src/gui.c Patch 6.1.200 问题: ":syn sync fromstart" is not skipped after ":if 0". This can make syntax highlighting very slow. 解决方案: Check "eap->skip" appropriately. (Rob West) 相关文件: src/syntax.c Patch 6.1.201 (depends on 6.1.192) 问题: Warning for illegal pointer combination. (Zoltan Arpadffy) 解决方案: Add a typecast. 相关文件: src/diff.c Patch 6.1.202 (extra)(depends on 6.1.148) 问题: Win32: filewritable() doesn't work properly on directories. 解决方案: fix filewritable(). (Mike Williams) 相关文件: src/os_win32.c Patch 6.1.203 问题: ":%s/~//" causes a crash after ":%s/x//". (Gary Holloway) 解决方案: Avoid reading past the end of a line when "~" is empty. 相关文件: src/regexp.c Patch 6.1.204 (depends on 6.1.129) 问题: Warning for an illegal pointer on Solaris. 解决方案: Add a typecast. (Derek Wyatt) 相关文件: src/misc2.c Patch 6.1.205 问题: The gzip plugin changes the alternate file when editing a compressed file. (Oliver Fuchs) 解决方案: Temporarily remove the 'a' and 'A' flags from 'cpo'. 相关文件: runtime/plugin/gzip.vim Patch 6.1.206 问题: The script generated with ":mksession" doesn't work properly when some commands are mapped. 解决方案: Use ":normal!" instead of ":normal". And use ":wincmd" where possible. (Muraoka Taro) 相关文件: src/ex_docmd.c, src/fold.c Patch 6.1.207 问题: Indenting a Java file hangs below a line with a comment after a command. 解决方案: Break out of a loop. (Andre Pang) Also line up } with matching {. 相关文件: runtime/indent/java.vim Patch 6.1.208 问题: Can't use the buffer number from the Python interface. 解决方案: Add buffer.number. (Michal Vitecek) 相关文件: src/if_python.c Patch 6.1.209 问题: Printing doesn't work on Mac OS classic. 解决方案: Use a ":" for path separator when opening the resource file. (Axel Kielhorn) 相关文件: src/ex_cmds2.c Patch 6.1.210 问题: When there is an iconv() conversion error when reading a file there can be an error the next time iconv() is used. 解决方案: Reset the state of the iconv() descriptor. (Yasuhiro Matsumoto) 相关文件: src/fileio.c Patch 6.1.211 问题: The message "use ! to override" is confusing. 解决方案: Make it "add ! to override". 相关文件: src/buffer.c, src/eval.c, src/ex_docmd.c, src/fileio.c, src/globals.h Patch 6.1.212 问题: When Vim was started with "-R" ":new" creates a buffer 'noreadonly' while ":enew" has 'readonly' set. (Preben Guldberg) 解决方案: Don't set 'readonly' in a new empty buffer for ":enew". 相关文件: src/ex_docmd.c Patch 6.1.213 问题: Using CTRL-W H may cause a big gap to appear below the last window. (Aric Blumer) 解决方案: Don't set the window height when there is a vertical split. (Yasuhiro Matsumoto) 相关文件: src/window.c Patch 6.1.214 问题: When installing Vim and the runtime files were checked out from CVS the CVS directories will also be installed. 解决方案: Avoid installing the CVS dirs and their contents. 相关文件: src/Makefile Patch 6.1.215 问题: Win32: ":pwd" uses backslashes even when 'shellslash' is set. (Xiangjiang Ma) 解决方案: Adjust backslashes before printing the message. 相关文件: src/ex_docmd.c Patch 6.1.216 问题: When dynamically loading the iconv library, the error codes may be confused. 解决方案: Use specific error codes for iconv and redefine them for dynamic loading. (Yasuhiro Matsumoto) 相关文件: src/fileio.c, src/mbyte.c, src/vim.h Patch 6.1.217 问题: When sourcing the same Vim script using a different name (symbolic link or MS-Windows 8.3 name) it is listed twice with ":scriptnames". (Tony Mechelynck) 解决方案: Turn the script name into a full path before using it. On Unix compare inode/device numbers. 相关文件: src/ex_cmds2.c Patch 6.1.218 问题: No error message for using the function argument "5+". (Servatius Brandt) 解决方案: Give an error message if a function or variable is expected but is not found. 相关文件: src/eval.c Patch 6.1.219 问题: When using ":amenu :b 1<CR>" with a Visual selection and 'insertmode' is set, Vim does not return to Insert mode. (Mickael Marchand) 解决方案: Add the command CTRL-\ CTRL-G that goes to Insert mode if 'insertmode' is set and to Normal mode otherwise. Append this to menus defined with ":amenu". 相关文件: src/edit.c, src/ex_getln.c, src/normal.c Patch 6.1.220 问题: When using a BufReadPost autocommand that changes the line count, e.g., "$-1join", reloading a file that was changed outside Vim does not work properly. (Alan G Isaac) 解决方案: Make the buffer empty before reading the new version of the file. Save the lines in a dummy buffer, so that they can be put back when reading the file fails. 相关文件: src/buffer.c, src/ex_cmds.c, src/fileio.c, src/globals.h, src/proto/buffer.pro Patch 6.1.221 问题: Changing case may not work properly, depending on the current locale. 解决方案: Add the 'casemap' option to let the user choose how changing case is to be done. Also fix lowering case when an UTF-8 character doesn't keep the same byte length. 相关文件: runtime/doc/options.txt, src/ascii.h, src/auto/configure, src/buffer.c, src/charset.c, src/config.h.in, src/configure.in, src/diff.c, src/edit.c, src/eval.c, src/ex_cmds2.c, src/ex_docmd.c, src/ex_getln.c, src/fileio.c, src/gui_amiga.c src/gui_mac.c, src/gui_photon.c, src/gui_w48.c, src/gui_beos.cc, src/macros.h, src/main.c, src/mbyte.c, src/menu.c, src/message.c, src/misc1.c, src/misc2.c, src/option.c, src/os_msdos.c, src/os_mswin.c, src/proto/charset.pro, src/regexp.c, src/option.h, src/syntax.c Patch 6.1.222 (depends on 6.1.219) 问题: Patch 6.1.219 was incomplete. 解决方案: Add the changes for ":amenu". 相关文件: src/menu.c Patch 6.1.223 (extra) 问题: Win32: When IME is activated 'iminsert' is set, but it might never be reset when IME is disabled. (Muraoka Taro) All systems: 'iminsert' is set to 2 when leaving Insert mode, even when langmap is being used. (Peter Valach) 解决方案: Don't set "b_p_iminsert" in _OnImeNotify(). (Muraoka Taro) Don't store the status of the input method in 'iminsert' when 'iminsert' is one. Also for editing the command line and for arguments to Normal mode commands. 相关文件: src/edit.c, src/ex_getln.c, src/gui_w32.c, src/normal.c Patch 6.1.224 问题: "expand('$VAR')" returns an empty string when the expanded $VAR is not an existing file. (Aric Blumer) 解决方案: Included non-existing files, as documented. 相关文件: src/eval.c Patch 6.1.225 问题: Using <C-O><C-^> in Insert mode has a delay when starting "vim -u NONE" and ":set nocp hidden". (Emmanuel) do_ecmd() uses fileinfo(), the redraw is done after a delay to give the user time to read the message. 解决方案: Put the message from fileio() in "keep_msg", so that the redraw is done before the delay (still needed to avoid the mode message overwrites the fileinfo() message). 相关文件: src/buffer.c Patch 6.1.226 问题: Using ":debug" with a ":normal" command may cause a hang. (Colin Keith) 解决方案: Save the typeahead buffer when obtaining a debug command. 相关文件: src/ex_cmds2.c, src/getchar.c, src/proto/getchar.pro Patch 6.1.227 问题: It is possible to use a variable name "asdf:asdf" and ":let j:asdf = 5" does not give an error message. (Mikolaj Machowski) 解决方案: Check for a ":" inside the variable name. 相关文件: src/eval.c Patch 6.1.228 (extra) 问题: Win32: The special output function for Hangul is used too often, causing special handling for other situations to be skipped. bInComposition is always FALSE, causing ImeGetTempComposition() always to return NULL. 解决方案: Remove HanExtTextOut(). Delete the dead code around bInComposition and ImeGetTempComposition(). 相关文件: src/gui_w16.c, src/gui_w32.c, src/gui_w48.c Patch 6.1.229 问题: Win32: Conversion to/from often used codepages requires the iconv library, which is not always available. 解决方案: Use standard MS-Windows functions for the conversion when possible. (mostly by Glenn Maynard) Also fixes missing declaration for patch 6.1.220. 相关文件: src/fileio.c Patch 6.1.230 (extra) 问题: Win16: building doesn't work. 解决方案: Exclude the XBUTTON handling. (Vince Negri) 相关文件: src/gui_w48.c Patch 6.1.231 问题: Double clicking with the mouse to select a word does not work for multibyte characters. 解决方案: Use vim_iswordc() instead of vim_isIDc(). This means 'iskeyword' is used instead of 'isident'. Also fix that mixing ASCII with multibyte word characters doesn't work, the mouse class for punctuation and word characters was mixed up. 相关文件: src/normal.c Patch 6.1.232 (depends on 6.1.226) 问题: Using ex_normal_busy while it might not be available. (Axel Kielhorn) 解决方案: Only use ex_normal_busy when FEAT_EX_EXTRA is defined. 相关文件: src/ex_cmds2.c Patch 6.1.233 问题: ":help expr-||" does not work. 解决方案: Don't use the '|' as a command separator 相关文件: src/ex_cmds.c Patch 6.1.234 (depends on 6.1.217) 问题: Get a warning for using a negative value for st_dev. 解决方案: Don't assign a negative value to st_dev. 相关文件: src/ex_cmds2.c Patch 6.1.235 (depends on 6.1.223) 问题: 'iminsert' is changed from 1 to 2 when leaving Insert mode. (Peter Valach) 解决方案: Check "State" before resetting it to NORMAL. 相关文件: src/edit.c Patch 6.1.236 问题: Memory leaks when appending lines for ":diffget" or ":diffput" and when reloading a changed buffer. 解决方案: Free a line after calling ml_append(). 相关文件: src/diff.c, src/fileio.c Patch 6.1.237 问题: Putting in Visual block mode does not work correctly when "$" was used or when the first line is short. (Christian Michon) 解决方案: First delete the selected text and then put the new text. Save and restore registers as necessary. 相关文件: src/globals.h, src/normal.c, src/ops.c, src/proto/ops.pro, src/vim.h Patch 6.1.238 (extra) 问题: Win32: The "icon=" argument for the ":menu" command does not search for the bitmap file. 解决方案: Expand environment variables and search for the bitmap file. (Vince Negri) Make it consistent, use the same mechanism for X11 and GTK. 相关文件: src/gui.c src/gui_gtk.c, src/gui_w32.c, src/gui_x11.c, src/proto/gui.pro Patch 6.1.239 问题: Giving an error for missing :endif or :endwhile when being interrupted. 解决方案: Don't give these messages when interrupted. 相关文件: src/ex_docmd.c, src/os_unix.c Patch 6.1.240 (extra) 问题: Win32 with BCC 5: CPU may be defined in the environment, which causes a wrong argument for the compiler. (Walter Briscoe) 解决方案: Use CPUNR instead of CPU. 相关文件: src/Make_bc5.mak Patch 6.1.241 问题: Something goes wrong when drawing or undrawing the cursor. 解决方案: Remember when the cursor invalid in a better way. 相关文件: src/gui.c Patch 6.1.242 问题: When pasting a large number of lines on the command line it is not possible to interrupt. (Jean Jordaan) 解决方案: Check for an interrupt after each pasted line. 相关文件: src/ops.c Patch 6.1.243 (extra) 问题: Win32: When the OLE version is started and wasn't registered, a message pops up to suggest registering, even when this isn't possible (when the registry is not writable). 解决方案: Check if registering is possible before asking whether it should be done. (Walter Briscoe) Also avoid restarting Vim after registering. 相关文件: src/if_ole.cpp Patch 6.1.244 问题: Patch 6.1.237 was missing the diff for vim.h. (Igor Goldenberg) 解决方案: Include it here. 相关文件: src/vim.h Patch 6.1.245 问题: Comparing with ignored case does not work properly for Unicode with a locale where case folding an ASCII character results in a multibyte character. (Glenn Maynard) 解决方案: Handle ignore-case compare for Unicode differently. 相关文件: src/mbyte.c Patch 6.1.246 问题: ":blast" goes to the first buffer if the last one is unlisted. (Andrew Stryker) 解决方案: From the last buffer search backwards for the first listed buffer instead of forwards. 相关文件: src/ex_docmd.c Patch 6.1.247 问题: ACL support doesn't always work properly. 解决方案: Add a configure argument to disable ACL "--disable-acl". (Thierry Vignaud) 相关文件: src/auto/configure, src/configure.in Patch 6.1.248 问题: Typing 'q' at the more-prompt for ":let" does not quit the listing. (Hari Krishna Dara) 解决方案: Quit the listing when got_int is set. 相关文件: src/eval.c Patch 6.1.249 问题: Can't expand a path on the command line if it includes a "|" as a trail byte of a multibyte character. 解决方案: Check for multibyte characters. (Yasuhiro Matsumoto) 相关文件: src/ex_docmd.c Patch 6.1.250 问题: When changing the value of 'lines' inside the expression set with 'diffexpr' Vim might crash. (Dave Fishburn) 解决方案: Don't allow changing the screen size while updating the screen. 相关文件: src/globals.h, src/option.c, src/screen.c Patch 6.1.251 问题: Can't use completion for ":lcd" and ":lchdir" like ":cd". 解决方案: Expand directory names for these commands. (Servatius Brandt) 相关文件: src/ex_docmd.c Patch 6.1.252 问题: "vi}" does not include a line break when the "}" is at the start of a following line. (Kamil Burzynski) 解决方案: Include the line break. 相关文件: src/search.c Patch 6.1.253 (extra) 问题: Win32 with Cygwin: Changes the path of arguments in a wrong way. (Xiangjiang Ma) 解决方案: Don't use cygwin_conv_to_posix_path() for the Win32 version. Update the Cygwin makefile to support more features. (Dan Sharp) 相关文件: src/Make_cyg.mak, src/if_ole.cpp, src/main.c Patch 6.1.254 问题: exists("foo{bar}") does not work. ':unlet v{"a"}r' does not work. ":let v{a}r1 v{a}r2" does not work. ":func F{(1)}" does not work. ":delfunc F{" does not give an error message. ':delfunc F{"F"}' does not work. 解决方案: Support magic braces for the exists() argument. (Vince Negri) Check for trailing comments explicitly for ":unlet". Add support for magic braces in further arguments of ":let". Look for a parenthesis only after the function name. (Servatius Brandt) Also expand magic braces for "exists('*expr')". Give an error message for an invalid ":delfunc" argument. Allow quotes in the ":delfunc" argument. 相关文件: src/eval.c, src/ex_cmds.h, src/ex_docmd.c Patch 6.1.255 (depends on 6.1.254) 问题: Crash when loading menu.vim a second time. (Christian Robinson) ":unlet garbage foo" tries unletting "foo" after an error message. (Servatius Brandt) Very long function arguments cause very long messages when 'verbose' is 14 or higher. 解决方案: Avoid reading from uninitialized memory. Break out of a loop after an invalid argument for ":unlet". Truncate long function arguments to 80 characters. 相关文件: src/eval.c Patch 6.1.256 (depends on 6.1.255) 问题: Defining a function after ":if 0" could still cause an error message for an existing function. Leaking memory when there are trailing characters for ":delfunc". 解决方案: Check the "skip" flag. Free the memory. (Servatius Brandt) 相关文件: src/eval.c Patch 6.1.257 问题: ":cwindow" always sets the previous window to the last but one window. (Benji Fisher) 解决方案: Set the previous window properly. 相关文件: src/globals.c, src/quickfix.c, src/window.c Patch 6.1.258 问题: Buffers menu doesn't work properly for multibyte buffer names. 解决方案: Use a pattern to get the left and right part of the name. (Yasuhiro Matsumoto) 相关文件: runtime/menu.vim Patch 6.1.259 (extra) 问题: Mac: with 'patchmode' is used filenames are truncated. 解决方案: Increase the BASENAMELEN for Mac OS X. (Ed Ralston) 相关文件: src/os_mac.h Patch 6.1.260 (depends on 6.1.104) 问题: GCC 3.2 still seems to have an optimizer problem. (Zvi Har'El) 解决方案: Use the same configure check as used for GCC 3.1. 相关文件: src/auto/configure, src/configure.in Patch 6.1.261 问题: When deleting a line in a buffer which is not the current buffer, using the Perl interface Delete(), the cursor in the current window may move. (Chris Houser) 解决方案: Don't adjust the cursor position when changing another buffer. 相关文件: src/if_perl.xs Patch 6.1.262 问题: When jumping over folds with "z[", "zj" and "zk" the previous position is not remembered. (Hari Krishna Dara) 解决方案: Set the previous context mark before jumping. 相关文件: src/fold.c Patch 6.1.263 问题: When typing a multibyte character that triggers an abbreviation it is not inserted properly. 解决方案: Handle adding the typed multibyte character. (Yasuhiro Matsumoto) 相关文件: src/getchar.c Patch 6.1.264 (depends on patch 6.1.254) 问题: exists() does not work for built-in functions. (Steve Wall) 解决方案: Don't check for the function name to start with a capital. 相关文件: src/eval.c Patch 6.1.265 问题: libcall() can be used in 'foldexpr' to call any system function. rename(), delete() and remote_send() can also be used in 'foldexpr'. These are security problems. (Georgi Guninski) 解决方案: Don't allow using libcall(), rename(), delete(), remote_send() and similar functions in the sandbox. 相关文件: src/eval.c Patch 6.1.266 (depends on 6.1.265) 问题: Win32: compile error in eval.c. (Bill McCarthy) 解决方案: Move a variable declaration. 相关文件: src/eval.c Patch 6.1.267 问题: Using "p" to paste into a Visual selected area may cause a crash. 解决方案: Allocate enough memory for saving the register contents. (Muraoka Taro) 相关文件: src/ops.c Patch 6.1.268 问题: When triggering an abbreviation with a multibyte character, this character is not correctly inserted after expanding the abbreviation. (Taro Muraoka) 解决方案: Add ABBR_OFF to all characters above 0xff. 相关文件: src/edit.c, src/ex_getln.c, src/getchar.c Patch 6.1.269 问题: After using input() text written with ":redir" gets extra indent. (David Fishburn) 解决方案: Restore msg_col after using input(). 相关文件: src/ex_getln.c Patch 6.1.270 (depends on 6.1.260) 问题: GCC 3.2.1 still seems to have an optimizer problem. 解决方案: Use the same configure check as used for GCC 3.1. 相关文件: src/auto/configure, src/configure.in Patch 6.1.271 问题: When compiling without the +syntax feature there are errors. 解决方案: Don't use some code for syntax highlighting. (Roger Cornelius) Make test 45 work without syntax highlighting. Also fix an error in a pattern matching: "\%(" was not supported. 相关文件: src/ex_cmds2.c, src/regexp.c, src/testdir/test45.in Patch 6.1.272 问题: After using ":set define<" a crash may happen. (Christian Robinson) 解决方案: Make a copy of the option value in allocated memory. 相关文件: src/option.c Patch 6.1.273 问题: When the cursor doesn't blink, redrawing an exposed area may hide the cursor. 解决方案: Always draw the cursor, also when it didn't move. (Muraoka Taro) 相关文件: src/gui.c Patch 6.1.274 (depends on 6.1.210) 问题: Resetting the iconv() state after each error is wrong for an incomplete sequence. 解决方案: Don't reset the iconv() state. 相关文件: src/fileio.c Patch 6.1.275 问题: When using "v" in a startup script, get warning message that terminal cannot highlight. (Charles Campbell) 解决方案: Only give the message after the terminal has been initialized. 相关文件: src/normal.c Patch 6.1.276 问题: "gvim --remote file" doesn't prompt for an encryption key. 解决方案: The further characters the client sends to the server are used. Added inputsave() and inputrestore() to allow prompting the user directly and not using typeahead. Also fix possible memory leak for ":normal". 相关文件: src/eval.c, src/ex_cmds2.c, src/ex_docmd.c, src/getchar.c, src/main.c, src/proto/getchar.pro, src/proto/ui.pro, src/runtime/doc/eval.txt, src/structs.h, src/ui.c, src/vim.h Patch 6.1.277 (depends on 6.1.276) 问题: Compilation error when building with small features. 解决方案: Define trash_input_buf() when needed. (Kelvin Lee) 相关文件: src/ui.c Patch 6.1.278 问题: When using signs the line number of a closed fold doesn't line up with the other line numbers. (Kamil Burzynski) 解决方案: Insert two spaces for the sign column. 相关文件: src/screen.c Patch 6.1.279 问题: The prototype for smsg() and smsg_attr() do not match the function definition. This may cause trouble for some compilers. (Nix) 解决方案: Use va_list for systems that have stdarg.h. Use "int" instead of "void" for the return type. 相关文件: src/auto/configure, src/config.h.in, src/configure.in, src/proto.h, src/message.c Patch 6.1.280 问题: It's possible to use an argument "firstline" or "lastline" for a function but using "a:firstline" or "a:lastline" in the function won't work. (Benji Fisher) 解决方案: Give an error message for these arguments. Also avoid that the following function body causes a whole row of errors, skip over it after an error in the first line. 相关文件: src/eval.c Patch 6.1.281 问题: In Insert mode CTRL-X CTRL-G leaves the cursor after the ruler. 解决方案: Set the cursor position before waiting for the argument of CTRL-G. (Yasuhiro Matsumoto) 相关文件: src/edit.c Patch 6.1.282 问题: Elvis uses "se" in a modeline, Vim doesn't recognize this. 解决方案: Also accept "se " where "set " is accepted in a modeline. (Yasuhiro Matsumoto) 相关文件: src/buffer.c Patch 6.1.283 问题: For ":sign" the icon file name cannot contain a space. 解决方案: Handle backslashes in the file name. (Yasuhiro Matsumoto) 相关文件: src/ex_cmds.c Patch 6.1.284 问题: On Solaris there is a warning for "struct utimbuf". 解决方案: Move including "utime.h" to outside the function. (Derek Wyatt) 相关文件: src/fileio.c Patch 6.1.285 问题: Can't wipe out a buffer with 'bufhide' option. 解决方案: Add "wipe" value to 'bufhide'. (Yegappan Lakshmanan) 相关文件: runtime/doc/options.txt, src/buffer.c, src/option.c, src/quickfix.c Patch 6.1.286 问题: 'showbreak' cannot contain multibyte characters. 解决方案: Allow using all printable characters for 'showbreak'. 相关文件: src/charset.c, src/move.c, src/option.c Patch 6.1.287 (depends on 6.1.285) 问题: Effect of "delete" and "wipe" in 'bufhide' were mixed up. 解决方案: Wipe out when wiping out is asked for. 相关文件: src/buffer.c Patch 6.1.288 问题: ":silent function F" hangs. (Hari Krishna Dara) 解决方案: Don't use msg_col, it is not incremented when using ":silent". Also made the function output look a bit better. Don't translate "function". 相关文件: src/eval.c Patch 6.1.289 (depends on 6.1.278) 问题: Compiler warning for pointer. (Axel Kielhorn) 解决方案: Add a typecast for " ". 相关文件: src/screen.c Patch 6.1.290 (extra) 问题: Truncating long text for message box may break multibyte character. 解决方案: Adjust to start of multibyte character. (Yasuhiro Matsumoto) 相关文件: src/os_mswin.c Patch 6.1.291 (extra) 问题: Win32: CTRL-@ doesn't work. Don't even get a message for it. 解决方案: Recognize the keycode for CTRL-@. (Yasuhiro Matsumoto) 相关文件: src/gui_w48.c Patch 6.1.292 (extra, depends on 6.1.253) 问题: Win32: Can't compile with new MingW compiler. Borland 5 makefile doesn't generate pathdef.c. 解决方案: Remove -wwide-multiply argument. (Rene de Zwart) Various fixes for other problems in Win32 makefiles. (Dan Sharp) 相关文件: src/Make_bc5.mak, src/Make_cyg.mak, src/Make_ming.mak, src/Make_mvc.mak Patch 6.1.293 问题: byte2line() returns a wrong result for some values. 解决方案: Change ">=" to ">" in ml_find_line_or_offset(). (Bradford C Smith) Add one to the line number when at the end of a block. 相关文件: src/memline.c Patch 6.1.294 问题: Can't include a multibyte character in a string by its hex value. (Benji Fisher) 解决方案: Add "\u....": a character specified with up to four hex numbers and stored according to the value of 'encoding'. 相关文件: src/eval.c Patch 6.1.295 (extra) 问题: Processing the cs.po file generates an error. (Rahul Agrawal) 解决方案: Fix the printf format characters in the translation. 相关文件: src/po/cs.po Patch 6.1.296 问题: Win32: When cancelling the font dialog 'guifont' remains set to "*". 解决方案: Restore the old value of 'guifont' (Yasuhiro Matsumoto) 相关文件: src/option.c Patch 6.1.297 问题: "make test" fails in test6 in an UTF-8 environment. (Benji Fisher) 解决方案: Before executing the BufReadPost autocommands save the current fileencoding, so that the file isn't marked changed. 相关文件: src/fileio.c Patch 6.1.298 问题: When using signs and the first line of a closed fold has a sign it can be redrawn as if the fold was open. (Kamil Burzynski) 解决方案: Don't redraw a sign inside a closed fold. 相关文件: src/screen.c Patch 6.1.299 问题: ":edit +set\ ro file" doesn't work. 解决方案: Halve the number of backslashes in the "+cmd" argument. 相关文件: src/ex_docmd.c Patch 6.1.300 (extra) 问题: Handling of ETO_IGNORELANGUAGE is confusing. 解决方案: Clean up the handling of ETO_IGNORELANGUAGE. (Glenn Maynard) 相关文件: src/gui_w32.c Patch 6.1.301 (extra) 问题: French translation of file-save dialog doesn't show file name. 解决方案: Insert a star in the printf string. (Francois Terrot) 相关文件: src/po/fr.po Patch 6.1.302 问题: Counting lines of the Visual area is incorrect for closed folds. (Mikolaj Machowski) 解决方案: Correct the start and end for the closed fold. 相关文件: src/normal.c Patch 6.1.303 (extra) 问题: The Top/Bottom/All text does not always fit in the ruler when translated to Japanese. Problem with a character being wider when in a bold font. 解决方案: Use ETO_PDY to specify the width of each character. (Yasuhiro Matsumoto) 相关文件: src/gui_w32.c Patch 6.1.304 (extra, depends on 6.1.292) 问题: Win32: Postscript is always enabled in the MingW Makefile. Pathdef.c isn't generated properly with Make_bc5.mak. (Yasuhiro Matsumoto) 解决方案: Change an ifdef to an ifeq. (Madoka Machitani) Use the Borland make redirection to generate pathdef.c. (Maurice Barnum) 相关文件: src/Make_bc5.mak, src/Make_ming.mak Patch 6.1.305 问题: When 'verbose' is 14 or higher, a function call may cause reading uninitialized data. (Walter Briscoe) 解决方案: Check for end-of-string in trunc_string(). 相关文件: src/message.c Patch 6.1.306 问题: The AIX VisualAge cc compiler doesn't define __STDC__. 解决方案: Use __EXTENDED__ like __STDC__. (Jess Thrysoee) 相关文件: src/os_unix.h Patch 6.1.307 问题: When a double-byte character has an illegal tail byte the display is messed up. (Yasuhiro Matsumoto) 解决方案: Draw "XX" instead of the wrong character. 相关文件: src/screen.c Patch 6.1.308 问题: Can't reset the Visual mode returned by visualmode(). 解决方案: Use an optional argument to visualmode(). (Charles Campbell) 相关文件: runtime/doc/eval.txt, src/eval.c, src/normal.c, src/structs.h Patch 6.1.309 问题: The tutor doesn't select German if the locale name is "German_Germany.1252". (Joachim Hofmann) 解决方案: Check for "German" in the locale name. Also check for ".ge". And include the German and Greek tutors. 相关文件: runtime/tutor/tutor.de, runtime/tutor/tutor.vim, runtime/tutor/tutor.gr, runtime/tutor/tutor.gr.cp737 Patch 6.1.310 (depends on 6.1.307) 问题: All double-byte characters are displayed as "XX". 解决方案: Use ">= 32" instead of "< 32". (Yasuhiro Matsumoto) 相关文件: src/screen.c Patch 6.1.311 (extra) 问题: VMS: path in window title doesn't include necessary separator. file version doesn't always work properly with Unix. Crashes because of memory overwrite in GUI. Didn't always handle files with lowercase and correct path. 解决方案: Fix the problems. Remove unnecessary file name translations. (Zoltan Arpadffy) 相关文件: src/buffer.c, src/ex_cmds2.c, src/fileio.c, src/memline.c, src/misc1.c, src/misc2.c, src/os_unix.c, src/os_vms.c, src/tag.c Patch 6.1.312 问题: When using ":silent" debugging is also done silently. 解决方案: Disable silence while at the debug prompt. 相关文件: src/ex_cmds2.c Patch 6.1.313 问题: When a ":drop fname" command is used and "fname" is open in another window, it is also opened in the current window. 解决方案: Change to the window with "fname" instead. Don't redefine the argument list when dropping only one file. 相关文件: runtime/doc/windows.txt, src/ex_cmds2.c, src/ex_cmds.c, src/ex_docmd.c, src/proto/ex_cmds2.pro, src/proto/ex_docmd.pro Patch 6.1.314 (depends on 6.1.126) 问题: Missing backslash in "Generic Config file" syntax menu. 解决方案: Insert the backslash. (Zak Beck) 相关文件: runtime/makemenu.vim, runtime/synmenu.vim Patch 6.1.315 (extra) 问题: A very long hostname may lead to an unterminated string. Failing to obtain a hostname may result in garbage. (Walter Briscoe) 解决方案: Add a NUL at the end of the hostname buffer. 相关文件: src/os_mac.c, src/os_msdos.c, src/os_unix.c, src/os_win16.c, src/os_win32.c Patch 6.1.316 问题: When exiting with "wq" and there is a hidden buffer, after the "file changed" dialog there is a warning for a changed buffer. (Ajit Thakkar) 解决方案: Do update the buffer timestamps when exiting. 相关文件: src/fileio.c Patch 6.1.317 问题: Closing a window may cause some of the remaining windows to be positioned wrong if there is a mix of horizontal and vertical splits. (Stefan Ingi Valdimarsson) 解决方案: Update the frame sizes before updating the window positions. 相关文件: src/window.c Patch 6.1.318 问题: auto/pathdef.c can include wrong quotes when a compiler flag includes quotes. 解决方案: Put a backslash before the quotes in compiler flags. (Shinra Aida) 相关文件: src/Makefile Patch 6.1.319 (depends on 6.1.276) 问题: Using "--remote +cmd file" does not execute "cmd". 解决方案: Call inputrestore() in the same command line as inputsave(), otherwise it will never get executed. 相关文件: src/main.c Patch 6.1.320 (depends on 6.1.313) 问题: When a ":drop one\ file" command is used the file "one\ file" is opened, the backslash is not removed. (Taro Muraoka) 解决方案: Handle backslashes correctly. Always set the argument list to keep it simple. 相关文件: runtime/doc/windows.txt, src/ex_cmds.c Patch 6.1.321 问题: When 'mouse' includes 'n' but not 'v', don't allow starting Visual mode with the mouse. 解决方案: Don't use MOUSE_MAY_VIS when there is no 'v' in 'mouse'. (Flemming Madsen) 相关文件: src/normal.c Patch 6.1.322 (extra, depends on 6.1.315) 问题: Win32: The host name is always "PC " plus the real host name. 解决方案: Don't insert "PC " before the host name. 相关文件: src/os_win32.c Patch 6.1.323 问题: ":registers" doesn't stop listing for a "q" at the more prompt. (Hari Krishna Dara) 解决方案: Check for interrupt and got_int. 相关文件: src/ops.c, src/proto/ops.pro Patch 6.1.324 问题: Crash when dragging a vertical separator when <LeftMouse> is remapped to jump to another window. 解决方案: Pass the window pointer to the function doing the dragging instead of always using the current window. (Daniel Elstner) Also fix that starting a drag changes window focus. 相关文件: src/normal.c, src/proto/window.pro, src/ui.c, src/vim.h, src/window.c Patch 6.1.325 问题: Shift-Tab is not automatically recognized in an xterm. 解决方案: Add <Esc>[Z as the termcap code. (Andrew Pimlott) 相关文件: src/term.c Patch 6.1.326 问题: Using a search pattern may read from uninitialized data (Yasuhiro Matsumoto) 解决方案: Initialize pointers to NULL. 相关文件: src/regexp.c Patch 6.1.327 问题: When opening the "mbyte.txt" help file the utf-8 characters are unreadable, because the fileencoding is forced to be latin1. 解决方案: Check for utf-8 encoding first in help files. (Daniel Elstner) 相关文件: runtime/doc/mbyte.txt, src/fileio.c Patch 6.1.328 问题: Prototype for enc_canon_search() is missing. 解决方案: Add the prototype. (Walter Briscoe) 相关文件: src/mbyte.c Patch 6.1.329 问题: When editing a file "a b c" replacing "%" in ":Cmd %" or ":next %" does not work properly. (Hari Krishna Dara) 解决方案: Always escape spaces when expanding "%". Don't split argument for <f-args> in a user command when only one argument is used. 相关文件: src/ex_docmd.c Patch 6.1.330 问题: GTK, Motif and Athena: Keypad keys produce the same code as non-keypad keys, making it impossible to map them separately. 解决方案: Use different termcap codes for the keypad keys. (Neil Bird) 相关文件: src/gui_gtk_x11.c, src/gui_x11.c Patch 6.1.331 问题: When translating the help files, "LOCAL ADDITIONS" no longer marks the spot where help files from plugins are to be listed. 解决方案: Add a "local-additions" tag and use that to find the right spot. 相关文件: runtime/doc/help.txt, src/ex_cmds.c Patch 6.1.332 (extra) 问题: Win32: Loading Perl dynamically doesn't work with Perl 5.8. Perl 5.8 also does not work with Cygwin and Ming. 解决方案: Adjust the function calls. (Taro Muraoka) Adjust the cyg and ming makefiles. (Dan Sharp) 相关文件: src/Make_cyg.mak, src/Make_ming.mak, src/Make_mvc.mak, src/if_perl.xs Patch 6.1.333 (extra) 问题: Win32: Can't handle Unicode text on the clipboard. Can't pass NUL byte, it becomes a line break. (Bruce DeVisser) 解决方案: Support Unicode for the clipboard (Ron Aaron and Glenn Maynard) Also support copy/paste of NUL bytes. 相关文件: src/os_mswin.c, src/os_win16.c src/os_win32.c Patch 6.1.334 (extra, depends on 6.1.303) 问题: Problem with drawing Hebrew characters. 解决方案: Only use ETO_PDY for Windows NT and the like. (Yasuhiro Matsumoto) 相关文件: src/gui_w32.c Patch 6.1.335 (extra) 问题: Failure of obtaining the cursor position and window size is ignored. 解决方案: Remove a semicolon after an "if". (Walter Briscoe) 相关文件: src/gui_w32.c Patch 6.1.336 (extra) 问题: Warning for use of function prototypes of smsg(). 解决方案: Define HAVE_STDARG_H. (Walter Briscoe) 相关文件: src/os_win32.h Patch 6.1.337 问题: When using "finish" in debug mode in function B() for ":call A(B())" does not stop after B() is finished. 解决方案: Increase debug_level while evaluating a function. 相关文件: src/ex_docmd.c Patch 6.1.338 问题: When using a menu that checks out the current file from Insert mode, there is no warning for the changed file until exiting Insert mode. (Srikanth Sankaran) 解决方案: Add a check for need_check_timestamps in the Insert mode loop. 相关文件: src/edit.c Patch 6.1.339 问题: Completion doesn't allow "g:" in ":let g:did_<Tab>". (Benji Fisher) 解决方案: Return "g:var" for global variables when that is what is being expanded. (Flemming Madsen) 相关文件: src/eval.c Patch 6.1.340 (extra, depends on 6.1.332) 问题: Win32: Can't compile the Perl interface with nmake. 解决方案: Don't compare the version number as a string but as a number. (Juergen Kraemer) 相关文件: src/Make_mvc.mak Patch 6.1.341 问题: In Insert mode with 'rightleft' set the cursor is drawn halfway a double-wide character. For CTRL-R and CTRL-K in Insert mode the " or ? is not displayed. 解决方案: Draw the cursor in the next character cell. Display the " or ? over the right half of the double-wide character. (Yasuhiro Matsumoto) Also fix that cancelling a digraph doesn't redraw a double-byte character correctly. 相关文件: src/edit.c, src/gui.c, src/mbyte.c Patch 6.1.342 (depends on 6.1.341) 问题: With 'rightleft' set typing "c" on a double-wide character causes the cursor to be displayed one cell to the left. 解决方案: Draw the cursor in the next character cell. (Yasuhiro Matsumoto) 相关文件: src/gui.c Patch 6.1.343 (depends on 6.1.342) 问题: Cannot compile with the +multi_byte feature but without +rightleft. Cannot compile without the GUI. 解决方案: Fix the #ifdefs. (partly by Nam SungHyun) 相关文件: src/gui.c, src/mbyte.c, src/ui.c Patch 6.1.344 问题: When using ":silent filetype" the output is still put in the message history. (Hari Krishna Dara) 解决方案: Don't add messages in the history when ":silent" is used. 相关文件: src/message.c Patch 6.1.345 (extra) 问题: Win32: 'imdisable' doesn't work. 解决方案: Make 'imdisable' work. (Yasuhiro Matsumoto) 相关文件: src/gui_w32.c Patch 6.1.346 问题: The scroll wheel can only scroll the current window. 解决方案: Make the scroll wheel scroll the window that the mouse points to. (Daniel Elstner) 相关文件: src/edit.c, src/gui.c, src/normal.c, src/term.c Patch 6.1.347 问题: When using cscope to list matching tags, the listed number is sometimes not equal to what cscope uses. (Vihren Milev) 解决方案: For cscope tags use only one table, don't give tags in the current file a higher priority. 相关文件: src/tag.c Patch 6.1.348 问题: Wildmode with wildmenu: ":set wildmode=list,full", ":colorscheme <tab>" results in "zellner" instead of the first entry. (Anand Hariharan) 解决方案: Don't call ExpandOne() from globpath(). (Flemming Madsen) 相关文件: src/ex_getln.c Patch 6.1.349 问题: "vim --serverlist" when no server was ever started gives an error message without "\n". "vim --serverlist" doesn't exit when the X server can't be contacted, it starts Vim unexpectedly. (Ricardo Signes) 解决方案: Don't give an error when no Vim server was ever started. Treat failing of opening the display equal to errors inside the remote*() functions. (Flemming Madsen) 相关文件: src/if_xcmdsrv.c, src/main.c Patch 6.1.350 问题: When entering a buffer with ":bnext" for the first time, using an autocommand to restore the last used cursor position doesn't work. (Paolo Giarusso) 解决方案: Don't use the last known cursor position of the current Vim invocation if an autocommand changed the position. 相关文件: src/buffer.c Patch 6.1.351 (depends on 6.1.349) 问题: Crash when starting Vim the first time in an X server. (John McGowan) 解决方案: Don't call xFree() with a fixed string. 相关文件: src/if_xcmdsrv.c Patch 6.1.352 (extra, depends on 6.1.345) 问题: Win32: Crash when setting "imdisable" in _vimrc. 解决方案: Don't call IME functions when imm32.dll was not loaded (yet). Also add typecasts to avoid Compiler warnings for ImmAssociateContext() argument. 相关文件: src/gui_w32.c Patch 6.1.353 (extra, depends on 6.1.334) 问题: Problem with drawing Arabic characters. 解决方案: Don't use ETO_PDY, do use padding. 相关文件: src/gui_w32.c Patch 6.1.354 (extra, depends on 6.1.333) 问题: MS-Windows 98: Notepad can't paste text copied from Vim when 'encoding' is "utf-8". 解决方案: Also make CF_TEXT available on the clipboard. (Ron Aaron) 相关文件: src/os_mswin.c Patch 6.1.355 问题: In a regexp '\n' will never match anything in a string. 解决方案: Make '\n' match a newline character. 相关文件: src/buffer.c, src/edit.c, src/eval.c, src/ex_cmds2.c, src/ex_docmd.c, src/ex_getln.c, src/fileio.c, src/misc1.c, src/option.c, src/os_mac.c, src/os_unix.c, src/quickfix.c, src/regexp.c, src/search.c, src/syntax.c, src/tag.c, src/vim.h Patch 6.1.356 (extra, depends on, well, eh, several others) 问题: Compiler warnings for using convert_setup() and a few other things. 解决方案: Add typecasts. 相关文件: src/mbyte.c, src/os_mswin.c, src/proto/os_win32.pro, src/os_win32.c Patch 6.1.357 问题: CR in the quickfix window jumps to the error under the cursor, but this doesn't work in Insert mode. (Srikanth Sankaran) 解决方案: Handle CR in Insert mode in the quickfix window. 相关文件: src/edit.c Patch 6.1.358 问题: The tutor doesn't select another locale version properly. 解决方案: Insert the "let" command. (Yasuhiro Matsumoto) 相关文件: runtime/tutor/tutor.vim Patch 6.1.359 (extra) 问题: Mac Carbon: Vim doesn't get focus when started from the command line. Crash when using horizontal scroll bar. 解决方案: Set Vim as the frontprocess. Fix scrolling. (Peter Cucka) 相关文件: src/gui_mac.c Patch 6.1.360 (depends on 6.1.341) 问题: In Insert mode CTRL-K ESC messes up a multibyte character. (Anders Helmersson) 解决方案: Save all bytes of a character when displaying a character temporarily. 相关文件: src/edit.c, src/proto/screen.pro, src/screen.c Patch 6.1.361 问题: Cannot jump to a file mark with ":'M". 解决方案: Allow jumping to another file for a mark in an Ex address when it is the only thing in the command line. 相关文件: src/ex_docmd.c Patch 6.1.362 问题: tgetent() may return zero for success. tgetflag() may return -1 for an error. 解决方案: Check tgetflag() for returning a positive value. Add an autoconf check for the value that tgetent() returns. 相关文件: src/auto/configure, src/config.h.in, src/configure.in, src/term.c Patch 6.1.363 问题: byte2line() can return one more than the number of lines. 解决方案: Return -1 if the offset is one byte past the end. 相关文件: src/memline.c Patch 6.1.364 问题: That the FileChangedShell autocommand event never nests makes it difficult to reload a file in a normal way. 解决方案: Allow nesting for the FileChangedShell event but do not allow triggering itself again. Also avoid autocommands for the cmdline window in rare cases. 相关文件: src/ex_getln.c, src/fileio.c, src/window.c Patch 6.1.365 (depends on 6.1.217) 问题: Setting a breakpoint in a sourced file with a relative path name doesn't work. (Servatius Brandt) 解决方案: Expand the file name to a full path. 相关文件: src/ex_cmds2.c Patch 6.1.366 问题: Can't use Vim with Netbeans. 解决方案: Add the Netbeans interface. Includes support for sign icons and "-fg" and "-bg" arguments for GTK. Add the 'autochdir' option. (Gordon Prieur, George Hernandez, Dave Weatherford) Make it possible to display both a sign with a text and one with line highlighting in the same line. Add support for Agide, interface version 2.1. Also fix that when 'iskeyword' includes '?' the "*" command doesn't work properly on a word that includes "?" (Bill McCarthy): Don't escape "?" to "\?" when searching forward. 相关文件: runtime/doc/Makefile, runtime/doc/netbeans.txt, runtime/doc/options.txt, runtime/doc/various.txt, src/Makefile, src/auto/configure, src/buffer.c, src/config.h.in, src/config.mk.in, src/configure.in, src/edit.c, src/ex_cmds.c, src/ex_docmd.c, src/feature.h, src/fileio.c, src/globals.h, src/gui.c, src/gui_beval.c, src/gui_gtk_x11.c, src/gui_x11.c, src/main.c, src/memline.c, src/misc1.c, src/misc2.c, src/move.c, src/nbdebug.c, src/nbdebug.h, src/netbeans.c, src/normal.c, src/ops.c, src/option.c, src/option.h, src/proto/buffer.pro, src/proto/gui_beval.pro, src/proto/gui_gtk_x11.pro, src/proto/gui_x11.pro, src/proto/misc2.pro, src/proto/netbeans.pro, src/proto/normal.pro, src/proto/ui.pro, src/proto.h, src/screen.c, src/structs.h, src/ui.c, src/undo.c, src/vim.h, src/window.c, src/workshop.c Patch 6.1.367 (depends on 6.1.365) 问题: Setting a breakpoint in a function doesn't work. For a sourced file it doesn't work when symbolic links are involved. (Servatius Brandt) 解决方案: Expand the file name in the same way as do_source() does. Don't prepend the path to a function name. 相关文件: src/ex_cmds2.c Patch 6.1.368 问题: Completion for ":map" does not include <silent> and <script>. ":mkexrc" do not save the <silent> attribute of mappings. 解决方案: Add "<silent>" to the generated map commands when appropriate. (David Elstner) Add <silent> and <script> to command line completion. 相关文件: src/getchar.c Patch 6.1.369 (extra) 问题: VMS: Vim hangs when attempting to edit a read-only file in the terminal. Problem with VMS filenames for quickfix. 解决方案: Rewrite low level input. Remove version number from file name in a couple more places. Fix crash after patch 6.1.362. Correct return code for system(). (Zoltan Arpadffy, Tomas Stehlik) 相关文件: src/misc1.c, src/os_unix.c, src/os_vms.c, src/proto/os_vms.pro, src/os_vms_conf.h, src/quickfix.c, src/ui.c Patch 6.1.370 问题: #ifdef nesting is unclear. 解决方案: Insert spaces to indicate the nesting. 相关文件: src/os_unix.c Patch 6.1.371 问题: "%V" in 'statusline' doesn't show "0-1" in an empty line. 解决方案: Add one to the column when comparing with virtual column (Andrew Pimlott) 相关文件: src/buffer.c Patch 6.1.372 问题: With 16 bit ints there are compiler warnings. (Walter Briscoe) 解决方案: Change int into long. 相关文件: src/structs.h, src/syntax.c Patch 6.1.373 问题: The default page header for printing is not translated. 解决方案: Add _() around the two places where "Page" is used. (Mike Williams) Translate the default value of the 'titleold' and 'printheader' options. 相关文件: src/ex_cmds2.c, src/option.c Patch 6.1.374 (extra) 问题: MS-Windows: Cannot build GvimExt with MingW or Cygwin. 解决方案: Add makefile and modified resource files. (Rene de Zwart) Also support Cygwin. (Alejandro Lopez_Valencia) 相关文件: GvimExt/Make_cyg.mak, GvimExt/Make_ming.mak, GvimExt/Makefile, GvimExt/gvimext_ming.def, GvimExt/gvimext_ming.rc Patch 6.1.375 问题: MS-Windows: ':!dir "%"' does not work for a file name with spaces. (Xiangjiang Ma) 解决方案: Don't insert backslashes for spaces in a shell command. 相关文件: src/ex_docmd.c Patch 6.1.376 问题: "vim --version" and "vim --help" have a non-zero exit code. That is unusual. (Petesea) 解决方案: Use a zero exit code. 相关文件: src/main.c Patch 6.1.377 问题: Can't add words to 'lispwords' option. 解决方案: Add P_COMMA and P_NODUP flags. (Haakon Riiser) 相关文件: src/option.c Patch 6.1.378 问题: When two buffer-local user commands are ambiguous, a full match with a global user command isn't found. (Hari Krishna Dara) 解决方案: Detect this situation and accept the global command. 相关文件: src/ex_docmd.c Patch 6.1.379 问题: Linux with kernel 2.2 can't use the alternate stack in combination with threading, causes an infinite loop. 解决方案: Don't use the alternate stack in this situation. 相关文件: src/os_unix.c Patch 6.1.380 问题: When 'winminheight' is zero and the quickfix window is zero lines, entering the window doesn't make it higher. (Christian J. Robinson) 解决方案: Make sure the current window is at least one line high. 相关文件: src/window.c Patch 6.1.381 问题: When a BufWriteCmd is used and it leaves the buffer modified, the window may still be closed. (Hari Krishna Dara) 解决方案: Return FAIL from buf_write() when the buffer is still modified after a BufWriteCmd autocommand was used. 相关文件: src/fileio.c Patch 6.1.382 (extra) 问题: Win32 GUI: When using two monitors, the code that checks/fixes the window size and position (e.g. when a font changes) doesn't work properly. (George Reilly) 解决方案: Handle a double monitor situation. (Helmut Stiegler) 相关文件: src/gui_w32.c Patch 6.1.383 问题: The filling of the status line doesn't work properly for multibyte characters. (Nam SungHyun) There is no check for going past the end of the buffer. 解决方案: Properly distinguish characters and bytes. Properly check for running out of buffer space. 相关文件: src/buffer.c, src/ex_cmds2.c, src/proto/buffer.pro, src/screen.c Patch 6.1.384 问题: It is not possible to find if a certain patch has been included. (Lubomir Host) 解决方案: Support using has() to check if a patch was included. 相关文件: runtime/doc/eval.txt, src/eval.c, src/proto/version.pro, src/version.c Patch 6.1.385 (depends on 6.1.383) 问题: Can't compile without the multibyte feature. 解决方案: Move an #ifdef. (Christian J. Robinson) 相关文件: src/buffer.c Patch 6.1.386 问题: Get duplicate tags when running ":helptags". 解决方案: Do the other half of moving a section to another help file. 相关文件: runtime/tagsrch.txt Patch 6.1.387 (depends on 6.1.373) 问题: Compiler warning for pointer cast. 解决方案: Add (char_u *). 相关文件: src/option.c Patch 6.1.388 (depends on 6.1.384) 问题: Compiler warning for pointer cast. 解决方案: Add (char *). Only include has_patch() when used. 相关文件: src/eval.c, src/version.c Patch 6.1.389 (depends on 6.1.366) 问题: Balloon evaluation doesn't work for GTK. has("balloon_eval") doesn't work. 解决方案: Add balloon evaluation for GTK. Also improve displaying of signs. (Daniel Elstner) Also make ":gui" start the netbeans connection and avoid using netbeans functions when the connection is not open. 相关文件: src/Makefile, src/feature.h, src/gui.c, src/gui.h, src/gui_beval.c, src/gui_beval.h, src/gui_gtk.c, src/gui_gtk_x11.c, src/eval.c, src/memline.c, src/menu.c, src/netbeans.c, src/proto/gui_beval.pro, src/proto/gui_gtk.pro, src/structs.h, src/syntax.c, src/ui.c, src/workshop.c Patch 6.1.390 (depends on 6.1.389) 问题: It's not possible to tell Vim to save and exit through the Netbeans interface. Would still try to send balloon eval text after the connection is closed. Can't use Unicode characters for sign text. 解决方案: Add functions "saveAndExit" and "getModified". Check for a working connection before sending a balloonText event. various other cleanups. Support any character for sign text. (Daniel Elstner) 相关文件: runtime/doc/netbeans.txt, runtime/doc/sign.txt, src/ex_cmds.c, src/netbeans.c, src/screen.c Patch 6.1.391 问题: ml_get() error when using virtualedit. (Charles Campbell) 解决方案: Get a line from a specific window, not the current one. 相关文件: src/charset.c Patch 6.1.392 (depends on 6.1.383) 问题: Highlighting in the 'statusline' is in the wrong position when an item is truncated. (Zak Beck) 解决方案: Correct the start of 'statusline' items properly for a truncated item. 相关文件: src/buffer.c Patch 6.1.393 问题: When compiled with Python and threads, detaching the terminal may cause Vim to loop forever. 解决方案: Add -pthread to $CFLAGS when using Python and gcc. (Daniel Elstner) 相关文件: src/auto/configure,, src/configure.in Patch 6.1.394 (depends on 6.1.390) 问题: The netbeans interface doesn't recognize multibyte glyph names. 解决方案: Check the number of cells rather than bytes to decide whether a glyph name is not a filename. (Daniel Elstner) 相关文件: src/netbeans.c Patch 6.1.395 (extra, depends on 6.1.369) 问题: VMS: OLD_VMS is never defined. Missing function prototype. 解决方案: Define OLD_VMS in Make_vms.mms. Add vms_sys_status() to os_vms.pro. (Zoltan Arpadffy) 相关文件: src/Make_vms.mms, src/proto/os_vms.pro Patch 6.1.396 (depends on 6.1.330) 问题: Compiler warnings for using enum. 解决方案: Add typecast to char_u. 相关文件: src/gui_gtk_x11.c, src/gui_x11.c Patch 6.1.397 (extra) 问题: The install program may use a wrong path for the diff command if there is a space in the install directory path. 解决方案: Use double quotes around the path if necessary. (Alejandro Lopez-Valencia) Also use double quotes around the file name arguments. 相关文件: src/dosinst.c Patch 6.1.398 问题: Saving the typeahead for debug mode causes trouble for a test script. (Servatius Brandt) 解决方案: Add the ":debuggreedy" command to avoid saving the typeahead. 相关文件: runtime/doc/repeat.txt, src/ex_cmds.h, src/ex_cmds2.c, src/ex_docmd.c, src/proto/ex_cmds2.pro Patch 6.1.399 问题: Warning for unused variable. 解决方案: Remove the variable two_or_more. 相关文件: src/ex_cmds.c Patch 6.1.400 (depends on 6.1.381) 问题: When a BufWriteCmd wipes out the buffer it may still be accessed. 解决方案: Don't try accessing a buffer that has been wiped out. 相关文件: src/fileio.c Patch 6.1.401 (extra) 问题: Building the Win16 version with Borland 5.01 doesn't work. "make test" doesn't work with Make_dos.mak. (Walter Briscoe) 解决方案: Various fixes to the w16 makefile. (Walter Briscoe) Don't use deltree. Use "mkdir \tmp" instead of "mkdir /tmp". 相关文件: src/Make_w16.mak, src/testdir/Make_dos.mak Patch 6.1.402 问题: When evaluating a function name with curly braces, an error is not handled consistently. 解决方案: Accept the result of a curly braces expression when an error was encountered. Skip evaluating an expression in curly braces when skipping. (Servatius Brandt) 相关文件: src/eval.c Patch 6.1.403 (extra) 问题: MS-Windows 16 bit: compiler warnings. 解决方案: Add typecasts. (Walter Briscoe) 相关文件: src/ex_cmds2.c, src/gui_w48.c, src/os_mswin.c, src/os_win16.c, src/syntax.c Patch 6.1.404 (extra) 问题: Various small problems. 解决方案: Fix comments. Various small additions, changes in indent, removal of unused items and fixes. 相关文件: Makefile, README.txt, runtime/menu.vim, runtime/vimrc_example.vim, src/INSTALL, src/INSTALLole.txt, src/Make_bc5.mak, src/Make_cyg.mak, src/Make_ming.mak, src/Makefile, src/config.h.in, src/edit.c, src/eval.c, src/ex_cmds2.c, src/ex_docmd.c, src/ex_getln.c, src/fileio.c, src/getchar.c, src/gui.c, src/gui_gtk.c, src/gui_photon.c, src/if_cscope.c, src/if_python.c, src/keymap.h, src/mark.c, src/mbyte.c, src/message.c, src/misc1.c, src/misc2.c, src/normal.c, src/option.c, src/os_os2_cfg.h, src/os_win32.c, src/proto/getchar.pro, src/proto/message.pro, src/proto/regexp.pro, src/screen.c, src/structs.h, src/syntax.c, src/term.c, src/testdir/test15.in, src/testdir/test15.ok, src/vim.rc, src/xxd/Make_cyg.mak, src/xxd/Makefile Patch 6.1.405 问题: A few files are missing from the toplevel Makefile. 解决方案: Add the missing files. 相关文件: Makefile Patch 6.1.406 (depends on 6.1.392) 问题: When a statusline item doesn't fit arbitrary text appears. (Christian J. Robinson) 解决方案: When there is just enough room but not for the "<" truncate the statusline item like there is no room. 相关文件: src/buffer.c Patch 6.1.407 问题: ":set scrollbind | help" scrollbinds the help window. (Andrew Pimlott) 解决方案: Reset 'scrollbind' when opening a help window. 相关文件: src/ex_cmds.c Patch 6.1.408 问题: When 'rightleft' is set unprintable character 0x0c is displayed as ">c0<". 解决方案: Reverse the text of the hex character. 相关文件: src/screen.c Patch 6.1.409 问题: Generating tags for the help doesn't work for some locales. 解决方案: Set LANG=C LC_ALL=C in the environment for "sort". (Daniel Elstner) 相关文件: runtime/doc/Makefile Patch 6.1.410 (depends on 6.1.390) 问题: Linking error when compiling with Netbeans but without sign icons. (Malte Neumann) 解决方案: Don't define buf_signcount() when sign icons are unavailable. 相关文件: src/buffer.c Patch 6.1.411 问题: When 'virtualedit' is set, highlighting a Visual block beyond the end of a line may be wrong. 解决方案: Correct the virtual column when the end of the line is before the displayed part of the line. (Muraoka Taro) 相关文件: src/screen.c Patch 6.1.412 问题: When swapping terminal screens and using ":gui" to start the GUI, the shell prompt may be after a hit-enter prompt. 解决方案: Output a newline in the terminal when starting the GUI and there was a hit-enter prompt.. 相关文件: src/gui.c Patch 6.1.413 问题: When 'clipboard' contains "unnamed", "p" in Visual mode doesn't work correctly. 解决方案: Save the register before overwriting it and put the resulting text on the clipboard afterwards. (Muraoka Taro) 相关文件: src/normal.c, src/ops.c Patch 6.1.414 (extra, depends on 6.1.369) 问题: VMS: Vim busy waits when waiting for input. 解决方案: Delay for a short while before getting another character. (Zoltan Arpadffy) 相关文件: src/os_vms.c Patch 6.1.415 问题: When there is a vertical split and a quickfix window, reducing the size of the Vim window may result in a wrong window layout and a crash. 解决方案: When reducing the window size and there is not enough space for 'winfixheight' set the frame height to the larger height, so that there is a retry while ignoring 'winfixheight'. (Yasuhiro Matsumoto) 相关文件: src/window.c Patch 6.1.416 (depends on 6.1.366) 问题: When using the Netbeans interface, a line with a sign cannot be changed. 解决方案: Respect the GUARDEDOFFSET for sign IDs when checking for a guarded area. 相关文件: src/netbeans.c Patch 6.1.417 问题: Unprintable multibyte characters are not handled correctly. Multi-byte characters above 0xffff are displayed as another character. 解决方案: Handle unprintable multibyte characters. Display multibyte characters above 0xffff with a marker. Recognize UTF-16 words and BOM words as unprintable. (Daniel Elstner) 相关文件: src/charset.c, src/mbyte.c, src/screen.c Patch 6.1.418 问题: The result of strftime() is in the current locals. Need to convert it to 'encoding'. 解决方案: Obtain the current locale and convert the argument for strftime() to it and the result back to 'encoding'. (Daniel Elstner) 相关文件: src/eval.c, src/ex_cmds.c, src/ex_cmds2.c, src/mbyte.c, src/proto/mbyte.pro, src/option.c, src/os_mswin.c Patch 6.1.419 问题: Vim doesn't compile on AIX 5.1. 解决方案: Don't define _NO_PROTO on this system. (Uribarri) 相关文件: src/auto/configure, src/configure.in Patch 6.1.420 (extra) 问题: convert_input() has an unnecessary STRLEN(). Conversion from UCS-2 to a codepage uses word count instead of byte count. 解决方案: Remove the STRLEN() call. (Daniel Elstner) Always use byte count for string_convert(). 相关文件: src/gui_w32.c, src/mbyte.c Patch 6.1.421 (extra, depends on 6.1.354) 问题: MS-Windows 9x: When putting text on the clipboard it can be in the wrong encoding. 解决方案: Convert text to the active codepage for CF_TEXT. (Glenn Maynard) 相关文件: src/os_mswin.c Patch 6.1.422 问题: Error in .vimrc doesn't cause hit-enter prompt when swapping screens. (Neil Bird) 解决方案: Set msg_didany also when sending a message to the terminal directly. 相关文件: src/message.c Patch 6.1.423 问题: Can't find arbitrary text in help files. 解决方案: Added the ":helpgrep" command. 相关文件: runtime/doc/various.txt, src/ex_cmds.h, src/ex_docmd.c, src/proto/quickfix.pro, src/quickfix.c Patch 6.1.424 (extra) 问题: Win32: gvim compiled with VC++ 7.0 run on Windows 95 does not show menu items. 解决方案: Define $WINVER to avoid an extra item is added to MENUITEMINFO. (Muraoka Taro) 相关文件: src/Make_mvc.mak Patch 6.1.425 问题: ":helptags $VIMRUNTIME/doc" does not add the "help-tags" tag. 解决方案: Do add the "help-tags" tag for that specific directory. 相关文件: src/ex_cmds.c Patch 6.1.426 问题: "--remote-wait +cmd file" waits forever. (Valery Kondakoff) 解决方案: Don't wait for the "+cmd" argument to have been edited. 相关文件: src/main.c Patch 6.1.427 问题: Several error messages for regexp patterns are not translated. 解决方案: Use _() properly. (Muraoka Taro) 相关文件: src/regexp.c Patch 6.1.428 问题: FreeBSD: wait() may hang when compiled with Python support and doing a system() call in a startup script. 解决方案: Use waitpid() instead of wait() and poll every 10 msec, just like what is done in the GUI. 相关文件: src/os_unix.c Patch 6.1.429 (depends on 6.1.390) 问题: Crash when using showmarks.vim plugin. (Charles Campbell) 解决方案: Check for sign_get_text() returning a NULL pointer. 相关文件: src/screen.c Patch 6.1.430 问题: In Lisp code backslashed parens should be ignored for "%". (Dorai) 解决方案: Skip over backslashed parens. 相关文件: src/search.c Patch 6.1.431 问题: Debug commands end up in redirected text. 解决方案: Disable redirection while handling debug commands. 相关文件: src/ex_cmds2.c Patch 6.1.432 (depends on 6.1.375) 问题: MS-Windows: ":make %:p" inserts extra backslashes. (David Rennalls) 解决方案: Don't add backslashes, handle it like ":!cmd". 相关文件: src/ex_docmd.c Patch 6.1.433 问题: ":popup" only works for Win32. 解决方案: Add ":popup" support for GTK. (Daniel Elstner) 相关文件: runtime/doc/gui.txt, src/ex_docmd.c, src/gui_gtk.c, src/menu.c, src/proto/gui_gtk.pro Patch 6.1.434 (extra) 问题: Win32: When there are more than 32767 lines, the scrollbar has a roundoff error. 解决方案: Make a click on an arrow move one line. Also move the code to gui_w48.c, there is hardly any difference between the 16 bit and 32 bit versions. (Walter Briscoe) 相关文件: src/gui_w16.c, src/gui_w32.c, src/gui_w48.c Patch 6.1.435 问题: ":winsize x" resizes the Vim window to the minimal size. (Andrew Pimlott) 解决方案: Give an error message for wrong arguments of ":winsize" and ":winpos". 相关文件: src/ex_docmd.c Patch 6.1.436 问题: When a long UTF-8 file contains an illegal byte it's hard to find out where it is. (Ron Aaron) 解决方案: Add the line number to the error message. 相关文件: src/fileio.c Patch 6.1.437 (extra, depends on 6.1.421) 问题: Using multibyte functions when they are not available. 解决方案: Put the clipboard conversion inside an #ifdef. (Vince Negri) Also fix a pointer type mistake. (Walter Briscoe) 相关文件: src/os_mswin.c Patch 6.1.438 问题: When Perl has thread support Vim cannot use the Perl interface. 解决方案: Add a configure check and disable Perl when it will not work. (Aron Griffis) 相关文件: src/auto/configure, src/configure.in Patch 6.1.439 问题: Netbeans: A "create" function doesn't actually create a buffer, following functions may fail. 解决方案: Create a Vim buffer without a name when "create" is called. (Gordon Prieur) 相关文件: runtime/doc/netbeans.txt, src/netbeans.c Patch 6.1.440 问题: The "@*" command doesn't obtain the actual contents of the clipboard. (Hari Krishna Dara) 解决方案: Obtain the clipboard text before executing the command. 相关文件: src/ops.c Patch 6.1.441 问题: "zj" and "zk" cannot be used as a motion command after an operator. (Ralf Hetzel) 解决方案: Accept these commands as motion commands. 相关文件: src/normal.c Patch 6.1.442 问题: Unicode 3.2 defines more space and punctuation characters. 解决方案: Add the new characters to the Unicode tables. (Raphael Finkel) 相关文件: src/mbyte.c Patch 6.1.443 (extra) 问题: Win32: The gvimext.dll build with Borland 5.5 requires another DLL. 解决方案: Build a statically linked version by default. (Dan Sharp) 相关文件: GvimExt/Make_bc5.mak Patch 6.1.444 (extra) 问题: Win32: Enabling a build with gettext support is not consistent. 解决方案: Use "GETTEXT" for Borland and msvc makefiles. (Dan Sharp) 相关文件: src/Make_bc5.mak, src/Make_mvc.mak Patch 6.1.445 (extra) 问题: DJGPP: get warning for argument of putenv() 解决方案: Define HAVE_PUTENV to use DJGPP's putenv(). (Walter Briscoe) 相关文件: src/os_msdos.h Patch 6.1.446 (extra) 问题: Win32: The MingW makefile uses a different style of arguments than other makefiles. Dynamic IME is not supported for Cygwin. 解决方案: Use "no" and "yes" style arguments. Remove the use of the dyn-ming.h include file. (Dan Sharp) Do not include the ime.h file and adjust the makefile. (Alejandro Lopez-Valencia) 相关文件: src/Make_cyg.mak, src/Make_ming.mak, src/gui_w32.c, src/if_perl.xs, src/if_python.c, src/if_ruby.c, src/os_win32.c Patch 6.1.447 问题: "make install" uses "make" directly for generating help tags. 解决方案: Use $(MAKE) instead of "make". (Tim Mooney) 相关文件: src/Makefile Patch 6.1.448 问题: 'titlestring' has a default maximum width of 50 chars per item. 解决方案: Remove the default maximum (also for 'statusline'). 相关文件: src/buffer.c Patch 6.1.449 问题: When "1" and "a" are in 'formatoptions', auto-formatting always moves a newly added character to the next line. (Servatius Brandt) 解决方案: Don't move a single character to the next line when it was just typed. 相关文件: src/edit.c Patch 6.1.450 问题: Termcap entry "kB" for back-tab is not recognized. 解决方案: Use back-tab as the shift-tab code. 相关文件: src/keymap.h, src/misc2.c, src/term.c Patch 6.1.451 问题: GUI: When text in the find dialog contains a slash, a backslash is inserted the next time it is opened. (Mezz) 解决方案: Remove escaped backslashes and question marks. (Daniel Elstner) 相关文件: src/gui.c Patch 6.1.452 (extra, after 6.1.446) 问题: Win32: IME support doesn't work for MSVC. 解决方案: Use _MSC_VER instead of __MSVC. (Alejandro Lopez-Valencia) 相关文件: src/gui_w32.c Patch 6.1.453 (after 6.1.429) 问题: When compiled without sign icons but with sign support, adding a sign may cause a crash. 解决方案: Check for the text sign to exist before using it. (Kamil Burzynski) 相关文件: src/screen.c Patch 6.1.454 (extra) 问题: Win32: pasting Russian text in Vim with 'enc' set to cp1251 results in utf-8 bytes. (Perelyubskiy) Conversion from DBCS to UCS2 does not work when 'encoding' is not the active codepage. 解决方案: Introduce enc_codepage and use it for conversion to 'encoding' (Glenn Maynard) Use MultiByteToWideChar() and WideCharToMultiByte() instead of iconv(). Should do most needed conversions without iconv.dll. 相关文件: src/globals.h, src/gui_w32.c, src/mbyte.c, src/os_mswin.c, src/proto/mbyte.pro, src/proto/os_mswin.pro, src/structs.h Patch 6.1.455 问题: Some Unicode characters can be one or two character cells wide. 解决方案: Add the 'ambiwidth' option to tell Vim how to display these characters. (Jungshik Shin) Also reset the script ID when setting an option to its default value, so that ":verbose set" won't give wrong info. 相关文件: runtime/doc/options.txt, src/mbyte.c, src/option.c, src/option.h Patch 6.1.456 (extra, after 6.1.454) 问题: Win32: IME doesn't work. 解决方案: ImmGetCompositionStringW() returns the size in bytes, not words. (Yasuhiro Matsumoto) Also fix typecast problem. 相关文件: src/gui_w32.c, src/os_mswin.c Patch 6.1.457 问题: An empty register in viminfo causes conversion to fail. 解决方案: Don't convert an empty string. (Yasuhiro Matsumoto) 相关文件: src/ex_cmds.c, src/mbyte.c Patch 6.1.458 问题: Compiler warning for pointer. 解决方案: Add a typecast. 相关文件: src/ex_cmds.c Patch 6.1.459 (extra) 问题: Win32: libcall() may return an invalid pointer and cause Vim to crash. 解决方案: Add a strict check for the returned pointer. (Bruce Mellows) 相关文件: src/os_mswin.c Patch 6.1.460 问题: GTK: after scrolling the text one line with a key, clicking the arrow of the scrollbar does not always work. (Nam SungHyun) 解决方案: Always update the scrollbar thumb when the value changed, even when it would not move, like for RISCOS. (Daniel Elstner) 相关文件: src/gui.c, src/gui.h Patch 6.1.461 问题: When a keymap is active, typing a character in Select mode does not use it. (Benji Fisher) 解决方案: Apply Insert mode mapping to the character typed in Select mode. 相关文件: src/normal.c Patch 6.1.462 问题: When autocommands wipe out a buffer, a crash may happen. (Hari Krishna Dara) 解决方案: Don't decrement the window count of a buffer before calling the autocommands for it. When re-using the current buffer, watch out for autocommands changing the current buffer. 相关文件: src/buffer.c, src/ex_cmds.c, src/proto/buffer.pro Patch 6.1.463 问题: When writing a compressed file, the file name that gzip stores in the file is the weird temporary file name. (David Rennalls) 解决方案: Use the real file name when possible. 相关文件: runtime/plugin/gzip.vim Patch 6.1.464 问题: Crash when using C++ syntax highlighting. (Gerhard Hochholzer) 解决方案: Check for a negative index. 相关文件: src/syntax.c Patch 6.1.465 (after 6.1.454) 问题: Compile error when using cygwin. 解决方案: Change #ifdef WIN32 to #ifdef WIN3264. (Alejandro Lopez-Valencia) Undefine WIN32 after including windows.h 相关文件: src/mbyte.c Patch 6.1.466 问题: The "-f" argument is a bit obscure. 解决方案: Add the "--nofork" argument. Improve the help text a bit. 相关文件: runtime/doc/starting.txt, src/main.c Patch 6.1.467 问题: Setting the window title doesn't work for Chinese. 解决方案: Use an X11 function to convert text to a text property. (Kentaro Nakazawa) 相关文件: src/os_unix.c Patch 6.1.468 问题: ":mksession" also stores folds for buffers which will not be restored. 解决方案: Only store folds for a buffer with 'buftype' empty and help files. 相关文件: src/ex_docmd.c Patch 6.1.469 问题: 'listchars' cannot contain multibyte characters. 解决方案: Handle multibyte UTF-8 list characters. (Matthew Samsonoff) 相关文件: src/message.c, src/option.c, src/screen.c Patch 6.1.470 (lang) 问题: Polish messages don't show up correctly on MS-Windows. 解决方案: Convert messages to cp1250. (Mikolaj Machowski) Also add English message translations, because it got in the way of the patch. 相关文件: Makefile, src/po/Makefile, src/po/en_gb.po, src/po/pl.po Patch 6.1.471 问题: ":jumps" output continues after pressing "q" at the more-prompt. (Hari Krishna Dara) 解决方案: Check for "got_int" being set. 相关文件: src/mark.c Patch 6.1.472 问题: When there is an authentication error when connecting to the X server Vim exits. 解决方案: Use XSetIOErrorHandler() to catch the error and longjmp() to avoid the exit. Also do this in the main loop, so that when the X server exits a Vim running in a console isn't killed. 相关文件: src/globals.h, src/main.c, src/os_unix.c Patch 6.1.473 问题: Referring to $curwin or $curbuf in Perl 5.6 causes a crash. 解决方案: Add "pTHX_" to cur_val(). (Yasuhiro Matsumoto) 相关文件: src/if_perl.xs Patch 6.1.474 问题: When opening the command-line window in Ex mode it's impossible to go back. (Pavol Juhas) 解决方案: Reset "exmode_active" and restore it when the command-line window is closed. 相关文件: src/ex_getln.c Patch 6.2f.001 问题: The configure check for Ruby didn't work properly for Ruby 1.8.0. 解决方案: Change the way the Ruby check is done. (Aron Griffis) 相关文件: src/auto/configure, src/configure.in Patch 6.2f.002 问题: The output of ":ls" doesn't show whether a buffer had read errors. 解决方案: Add the "x" flag in the ":ls" output. 相关文件: runtime/doc/windows.txt, src/buffer.c Patch 6.2f.003 问题: Test49 doesn't properly test the behavior of ":catch" without an argument. 解决方案: Update test49. (Servatius Brandt) 相关文件: src/testdir/test49.ok, src/testdir/test49.vim Patch 6.2f.004 问题: "vim --version" always uses CR/LF in the output. 解决方案: Omit the CR. 相关文件: src/message.c, src/os_unix.c Patch 6.2f.005 问题: Two error messages without a colon after the number. 解决方案: Add the colon. (Taro Muraoka) 相关文件: src/if_cscope.c Patch 6.2f.006 问题: When saving a file takes a while and Vim regains focus this can result in a "file changed outside of Vim" warning and ml_get() errors. (Mike Williams) 解决方案: Add the "b_saving" flag to avoid checking the timestamp while the buffer is being saved. (Michael Schaap) 相关文件: src/fileio.c, src/structs.h Patch 6.2f.007 问题: Irix compiler complains about multiple defined symbols. vsnprintf() is not available. (Charles Campbell) 解决方案: Insert EXTERN for variables in globals.h. Change the configure check for vsnprintf() from compiling to linking. 相关文件: src/auto/configure, src/configure.in, src/globals.h Patch 6.2f.008 问题: The Aap recipe doesn't work with Aap 0.149. 解决方案: Change targetarg to TARGETARG. Update the mysign file. 相关文件: src/main.aap, src/mysign Patch 6.2f.009 (extra) 问题: Small problem when building with Borland 5.01. 解决方案: Use mkdir() instead of _mkdir(). (Walter Briscoe) 相关文件: src/dosinst.h Patch 6.2f.010 问题: Warning for missing prototypes. 解决方案: Add missing prototypes. (Walter Briscoe) 相关文件: src/if_cscope.c Patch 6.2f.011 问题: The configure script doesn't work with autoconf 2.5x. 解决方案: Add square brackets around a header check. (Aron Griffis) Note: touch src/auto/configure after applying this patch. 相关文件: src/configure.in Patch 6.2f.012 问题: ":echoerr" doesn't work correctly inside try/endtry. 解决方案: Don't reset did_emsg inside a try/endtry. (Servatius Brandt) 相关文件: src/eval.c Patch 6.2f.013 (extra) 问题: Macintosh: Compiler warning for a trigraph. 解决方案: Insert a backslash before each question mark. (Peter Cucka) 相关文件: src/os_mac.h Patch 6.2f.014 (extra) 问题: Macintosh: ex_eval is not included in the project file. 解决方案: Add ex_eval. (Dany St-Amant) 相关文件: src/os_mac.pbproj/project.pbxproj Patch 6.2f.015 (extra) 问题: Win32: When changing header files not all source files involved are recompiled. 解决方案: Improve the dependency rules. (Dan Sharp) 相关文件: src/Make_cyg.mak, src/Make_ming.mak Patch 6.2f.016 问题: "vim --version > ff" on non-Unix systems results in a file with a missing line break at the end. (Bill McCarthy) 解决方案: Add a line break. 相关文件: src/main.c Patch 6.2f.017 问题: Unix: starting Vim in the background and then bringing it to the foreground may cause the terminal settings to be wrong. 解决方案: Check for tcsetattr() to return an error, retry when it does. (Paul Tapper) 相关文件: src/os_unix.c Patch 6.2f.018 问题: Mac OS X 10.2: OK is defined to zero in curses.h while Vim uses one. Redefining it causes a warning message. 解决方案: Undefine OK before defining it to one. (Taro Muraoka) 相关文件: src/vim.h Patch 6.2f.019 问题: Mac OS X 10.2: COLOR_BLACK and COLOR_WHITE are defined in curses.h. 解决方案: Rename them to PRCOLOR_BLACK and PRCOLOR_WHITE. 相关文件: src/ex_cmds2.c Patch 6.2f.020 问题: Win32: test50 produces beeps and fails with some versions of diff. 解决方案: Remove empty lines and convert the output to dos fileformat. 相关文件: src/testdir/test50.in Patch 6.2f.021 问题: Running configure with "--enable-netbeans" disables Netbeans. (Gordon Prieur) 解决方案: Fix the tests in configure.in where the default is to enable a feature. Fix that "--enable-acl" reported "yes" confusingly. 相关文件: src/auto/configure, src/configure.in, src/mysign Patch 6.2f.022 问题: A bogus value for 'foldmarker' is not rejected, possibly causing a hang. (Derek Wyatt) 解决方案: Check for a non-empty string before and after the comma. 相关文件: src/option.c Patch 6.2f.023 问题: When the help files are not in $VIMRUNTIME but 'helpfile' is correct Vim still can't find the help files. 解决方案: Also look for a tags file in the directory of 'helpfile'. 相关文件: src/tag.c Patch 6.2f.024 问题: When 'delcombine' is set and a character has more than two composing characters "x" deletes them all. 解决方案: Always delete only the last composing character. 相关文件: src/misc1.c Patch 6.2f.025 问题: When reading a file from stdin that has DOS line endings but a missing end-of-line for the last line 'fileformat' becomes "unix". (Bill McCarthy) 解决方案: Don't add the missing line break when re-reading the text from the buffer. 相关文件: src/fileio.c Patch 6.2f.026 问题: When typing new text at the command line, old composing characters may be displayed. 解决方案: Don't read composing characters from after the end of the text to be displayed. 相关文件: src/ex_getln.c, src/mbyte.c, src/message.c, src/proto/mbyte.pro, src/screen.c Patch 6.2f.027 问题: Compiler warnings for unsigned char pointers. (Tony Leneis) 解决方案: Add typecasts to char pointer. 相关文件: src/quickfix.c Patch 6.2f.028 问题: GTK: When 'imactivatekey' is empty and XIM is inactive it can't be made active again. Cursor isn't updated immediately when changing XIM activation. Japanese XIM may hang when using 'imactivatekey'. Can't activate XIM after typing fFtT command or ":sh". 解决方案: Properly set the flag that indicates the IM is active. Update the cursor right away. Do not send a key-release event. Handle Normal mode and running an external command differently. (Yasuhiro Matsumoto) 相关文件: src/mbyte.c Patch 6.2f.029 问题: Mixing use of int and enum. 解决方案: Adjust argument type of cs_usage_msg(). Fix wrong typedef. 相关文件: src/if_cscope.c, src/if_cscope.h Patch 6.2f.030 (after 6.2f.028) 问题: Cursor moves up when using XIM. 解决方案: Reset im_preedit_cursor. (Yasuhiro Matsumoto) 相关文件: src/mbyte.c Patch 6.2f.031 问题: Crash when listing a function argument in the debugger. (Ron Aaron) 解决方案: Init the name field of an argument to NULL. 相关文件: src/eval.c Patch 6.2f.032 问题: When a write fails for a ":silent!" while inside try/endtry the BufWritePost autocommands are not triggered. 解决方案: Check the emsg_silent flag in should_abort(). (Servatius Brandt) 相关文件: src/ex_eval.c, src/testdir/test49.ok, src/testdir/test49.vim Patch 6.2f.033 问题: Cscope: re-entrance problem for ":cscope" command. Checking for duplicate database didn't work well for Win95. Didn't check for duplicate databases after an empty entry. 解决方案: Don't set postponed_split too early. Remember first empty database entry. (Sergey Khorev) 相关文件: src/if_cscope.c Patch 6.2f.034 问题: The netbeans interface cannot be used on systems without vsnprintf(). (Tony Leneis) 解决方案: Use EMSG(), EMSGN() and EMSG2() instead. 相关文件: src/auto/configure, src/configure.in, src/netbeans.c Patch 6.2f.035 问题: The configure check for the netbeans interface doesn't work if the socket and nsl libraries are required. 解决方案: Check for the socket and nsl libraries before the netbeans check. 相关文件: src/auto/configure, src/configure.in Patch 6.2f.036 问题: Moving leftwards over text with an illegal UTF-8 byte moves one byte instead of one character. 解决方案: Ignore an illegal byte after the cursor position. 相关文件: src/mbyte.c Patch 6.2f.037 问题: When receiving a Netbeans command at the hit-enter or more prompt the screen is redrawn but Vim is still waiting at the prompt. 解决方案: Quit the prompt like a CTRL-C was typed. 相关文件: src/netbeans.c Patch 6.2f.038 问题: The dependency to run autoconf causes a patch for configure.in to run autoconf, even though the configure script was updated as well. 解决方案: Only run autoconf with "make autoconf". 相关文件: src/Makefile Patch 6.2f.039 问题: CTRL-W K makes the new top window very high. 解决方案: When 'equalalways' is set equalize the window heights. 相关文件: src/window.c

6.3 版 本 version-6.3

本小节讨论 6.2 和 6.3 版本之间的改进。 这是一个漏洞修正版。也有一些新特性。主要的新项目来自运行时文件和翻译。 改动 changed-6.3

介绍文字也显示赞助 Vim 的说明,和帮助乌干达儿童的消息混合在一起。 正常运行时文件里包含了包含翻译的菜单、键盘映射表和教程。单独的 "lang" 归档现在 只包含翻译的消息。 翻译菜单的文件名更加一致。使用 "latin1" 代替 "iso_8859-1" 和 "iso_8859-15"。 发布里删除了 "file_select.vim" 脚本。和 www.vim.org 可以下载的其它脚本比起来, 并不更有用。 "runtime/doc/tags" 文件现在总是 unix 文件格式。MS-Windows 上过去使用 dos 文件 格式,但 ":helptags" 产生 unix 格式的文件。 新增 added-6.3

新增命令: :cNfile 跳转到上个文件的最后的一个错误 :cpfile 同上 :changes 显示改变表 :keepmarks 后面跟随的命令保持位置标记不变 :keepjumps 后面跟随的命令保持跳转表和位置标记不变 :lockmarks 后面跟随的命令保持位置标记不变 :redrawstatus 强制刷新状态行 新选项: 'antialias' Mac OS X: 使用平滑反锯齿字体 'helplang' 偏好的帮助语言 语法文件: Arch inventory (Nikolai Weibull) Calendar (Nikolai Weibull) Ch (Wayne Cheng) Controllable Regex Mutilator (Nikolai Weibull) D (Jason Mills) Desktop (Mikolaj Machowski) Dircolors (Nikolai Weibull) Elinks configuration (Nikolai Weibull) FASM (Ron Aaron) GrADS 脚本 (Stefan Fronzek) Icewm 菜单 (James Mahler) LDIF (Zak Johnson) Locale input,fdcc。(Dwayne Bailey) Pinfo config (Nikolai Weibull) Pyrex (Marco Barisione) Relax NG Compact (Nikolai Weibull) Slice (Morel Bodin) VAX Macro Assembly (Tom Uijldert) grads (Stefan Fronzek) libao (Nikolai Weibull) mplayer (Nikolai Weibull) rst (Nikolai Weibull) tcsh (Gautam Iyer) yaml (Nikolai Weibull) 编译器插件: ATT dot (Marcos Macedo) Apple Project Builder (Alexander von Below) Intel (David Harrison) bdf (Nikolai Weibull) icc (Peter Puck) javac (Doug Kearns) neato (Marcos Macedo) onsgmls (Robert B. Rowsome) perl (Christian J. Robinson) rst (Nikolai Weibull) se (SmartEiffel) (Doug Kearns) tcl (Doug Kearns) xmlwf (Robert B. Rowsome) 文件类型插件: Aap (Bram Moolenaar) Ch (Wayne Cheng) Css (Nikolai Weibull) Pyrex (Marco Barisione) Rst (Nikolai Weibull) 缩进脚本: Aap (Bram Moolenaar) Ch (Wayne Cheng) DocBook (Nikolai Weibull) MetaPost (Eugene Minkovskii) Objective-C (Kazunobu Kuriyama) Pyrex (Marco Barisione) Rst (Nikolai Weibull) Tcsh (Gautam Iyer) XFree86 配置文件 (Nikolai Weibull) Zsh (Nikolai Weibull) 键盘映射表: cp1253 的希腊语 (Panagiotis Louridas) 匈牙利语 (Magyar) (Laszlo Zavaleta) 波斯-伊朗语 (Behnam Esfahbod) 消息翻译: 加泰隆语 (Ernest Adrogue) 俄语 (Vassily Ragosin) 瑞典语 (Johan Svedberg) 菜单翻译: 加泰隆语 (Ernest Adrogue) 俄语 (Tim Alexeevsky) 瑞典语 (Johan Svedberg) 教程翻译: 加泰隆语 (Ernest Adrogue) cp1251 的俄语 (Alexey Froloff) cp1250 和 iso8859-2 的斯洛伐克语 (Lubos Celko) 瑞典语 (Johan Svedberg) 韩语 (Kee-Won Seo) UTF-8 版本的日语教程 (Yasuhiro Matsumoto) 这是原版,其它日语教程都是由 它转换而成。 包含了 "russian.txt" 帮助文件。(Vassily Ragosin) extra 归档里包含了 Encapsulated PostScript 和 PDF 版本的 Vim 记号 (logo)。 帮助高亮寻找高亮组,是用它们实际的颜色来显示它们自身。(Yakov Lerner 的意见) big 的 Win32 版本现在编译时加入 Ruby 接口,1.8 版本。Python 使用 2.3 版本。 Perl 使用 5.8 版本。 文档里提到了 "ftdetect" 目录。DOS 安装程序会建立它。 修正 fixed-6.3

Test 42 failed on MS-Windows. Set and reset 'fileformat' and 'binary' options here and there. (Walter Briscoe) The explorer plugin didn't work for double-byte 'encoding's. Use "copy /y" in Make_bc5.mak to avoid a prompt for overwriting. Patch 6.2.001 问题: The ":stopinsert" command doesn't have a help tag. 解决方案: Add the tag. (Antoine J. Mechelynck) 相关文件: runtime/doc/insert.txt, runtime/doc/tags Patch 6.2.002 问题: When compiled with the +multi_byte feature but without +eval, displaying UTF-8 characters may cause a crash. (Karsten Hopp) 解决方案: Also set the default for 'ambiwidth' when compiled without the +eval feature. 相关文件: src/option.c Patch 6.2.003 问题: GTK 2: double-wide characters below 256 are not displayed correctly. 解决方案: Check the cell width for characters above 127. (Yasuhiro Matsumoto) 相关文件: src/gui_gtk_x11.c Patch 6.2.004 问题: With a line-Visual selection at the end of the file a "p" command puts the text one line upwards. 解决方案: Detect that the last line was deleted and put forward. (Taro Muraoka) 相关文件: src/normal.c Patch 6.2.005 问题: GTK: the "Find" and "Find and Replace" tools don't work. (Aschwin Marsman) 解决方案: Show the dialog after creating it. (David Necas) 相关文件: src/gui_gtk.c Patch 6.2.006 问题: The Netbeans code contains an obsolete function that uses "vim61" and sets the fall-back value for $VIMRUNTIME. 解决方案: Delete the obsolete function. 相关文件: src/main.c, src/netbeans.c, src/proto/netbeans.pro Patch 6.2.007 问题: Listing tags for Cscope doesn't always work. 解决方案: Avoid using smgs_attr(). (Sergey Khorev) 相关文件: src/if_cscope.c Patch 6.2.008 问题: XIM with GTK 2: After backspacing preedit characters are wrong. 解决方案: Reset the cursor position. (Yasuhiro Matsumoto) 相关文件: src/mbyte.c Patch 6.2.009 问题: Win32: The self-installing executable "Full" selection only selects some of the items to install. (Salman Mohsin) 解决方案: Change commas to spaces in between section numbers. 相关文件: nsis/gvim.nsi Patch 6.2.010 问题: When 'virtualedit' is effective and a line starts with a multibyte character, moving the cursor right doesn't work. 解决方案: Obtain the right character to compute the column offset. (Taro Muraoka) 相关文件: src/charset.c Patch 6.2.011 问题: Alpha OSF1: stat() is a macro and doesn't allow an #ifdef halfway. (Moshe Kaminsky) 解决方案: Move the #ifdef outside of stat(). 相关文件: src/os_unix.c Patch 6.2.012 问题: May hang when polling for a character. 解决方案: Break the wait loop when not waiting for a character. 相关文件: src/os_unix.c Patch 6.2.013 (extra) 问题: Win32: The registry key for uninstalling GvimExt still uses "6.1". 解决方案: Change the version number to "6.2". (Ajit Thakkar) 相关文件: src/GvimExt/GvimExt.reg Patch 6.2.014 (after 6.2.012) 问题: XSMP doesn't work when using poll(). 解决方案: Use xsmp_idx instead of gpm_idx. (Neil Bird) 相关文件: src/os_unix.c Patch 6.2.015 问题: The +xsmp feature is never enabled. 解决方案: Move the #define for USE_XSMP to below where WANT_X11 is defined. (Alexey Froloff) 相关文件: src/feature.h Patch 6.2.016 问题: Using ":scscope find" with 'cscopequickfix' does not always split the window. (Gary Johnson) Win32: ":cscope add" could make the script that contains it read-only until the corresponding ":cscope kill". Errors during ":cscope add" may not be handled properly. 解决方案: When using the quickfix window may need to split the window. Avoid file handle inheritance for the script. Check for a failed connection and/or process. (Sergey Khorev) 相关文件: src/ex_cmds2.c, src/if_cscope.c Patch 6.2.017 问题: Test11 sometimes prompts the user, because a file would have been changed outside of Vim. (Antonio Colombo) 解决方案: Add a FileChangedShell autocommand to avoid the prompt. 相关文件: src/testdir/test11.in Patch 6.2.018 问题: When using the XSMP protocol and reading from stdin Vim may wait for a key to be pressed. 解决方案: Avoid that RealWaitForChar() is used recursively. 相关文件: src/os_unix.c Patch 6.2.019 (lang) 问题: Loading the Portuguese menu causes an error message. 解决方案: Join two lines. (Jose Pedro Oliveira, José de Paula) 相关文件: runtime/lang/menu_pt_br.vim Patch 6.2.020 问题: The "Syntax/Set syntax only" menu item causes an error message. (Oyvind Holm) 解决方案: Set the script-local variable in a function. (Benji Fisher) 相关文件: runtime/synmenu.vim Patch 6.2.021 问题: The user manual section on exceptions contains small mistakes. 解决方案: Give a good example of an error that could be missed and other improvements. (Servatius Brandt) 相关文件: runtime/doc/usr_41.txt Patch 6.2.022 (extra) 问题: Win32: After deleting a menu item it still appears in a tear-off window. 解决方案: Set the mode to zero for the deleted item. (Yasuhiro Matsumoto) 相关文件: src/gui_w32.c Patch 6.2.023 (extra) 问题: Win32: Make_ivc.mak does not clean everything. 解决方案: Delete more files in the clean rule. (Walter Briscoe) 相关文件: src/Make_ivc.mak Patch 6.2.024 (extra) 问题: Win32: Compiler warnings for typecasts. 解决方案: Use DWORD instead of WORD. (Walter Briscoe) 相关文件: src/gui_w32.c Patch 6.2.025 问题: Missing prototype for sigaltstack(). 解决方案: Add the prototype when it is not found in a header file. 相关文件: src/os_unix.c Patch 6.2.026 问题: Warning for utimes() argument. 解决方案: Add a typecast. 相关文件: src/fileio.c Patch 6.2.027 问题: Warning for uninitialized variable. 解决方案: Set mb_l to one when not using multibyte characters. 相关文件: src/message.c Patch 6.2.028 问题: Cscope connection may kill Vim process and others. 解决方案: Check for pid being larger than one. (Khorev Sergey) 相关文件: src/if_cscope.c Patch 6.2.029 问题: When using the remote server functionality Vim may leak memory. (Srikanth Sankaran) 解决方案: Free the result of XListProperties(). 相关文件: src/if_xcmdsrv.c Patch 6.2.030 问题: Mac: Warning for not being able to use precompiled header files. 解决方案: Don't redefine select. Use -no-cpp-precomp for compiling, so that function prototypes are still found. 相关文件: src/os_unix.c, src/osdef.sh Patch 6.2.031 问题: The langmenu entry in the options window doesn't work. (Rodolfo Lima) With GTK 1 the ":options" command causes an error message. (Michael Naumann) 解决方案: Change "lmenu" to "langmenu". Only display the 'tbis' option for GTK 2. 相关文件: runtime/optwin.vim Patch 6.2.032 问题: The lpc filetype is never recognized. (Shizhu Pan) 解决方案: Check for g:lpc_syntax_for_c instead of the local variable lpc_syntax_for_c. (Benji Fisher) 相关文件: runtime/filetype.vim Patch 6.2.033 (extra) 问题: Mac: Various compiler warnings. 解决方案: Don't include Classic-only headers in Unix version. Remove references to several unused variables. (Ben Fowler) Fix double definition of DEFAULT_TERM. Use int instead of unsigned short for pixel values, so that the negative error values are recognized. 相关文件: src/gui_mac.c, src/term.c Patch 6.2.034 问题: Mac: Compiler warning for redefining DEFAULT_TERM. 解决方案: Fix double definition of DEFAULT_TERM. 相关文件: src/term.c Patch 6.2.035 问题: Mac: Compiler warnings in Python interface. 解决方案: Make a difference between pure Mac and Unix-Mac. (Peter Cucka) 相关文件: src/if_python.c Patch 6.2.036 (extra) 问题: Mac Unix version: If foo is a directory, then ":e f<Tab>" should expand to ":e foo/" instead of ":e foo" . (Vadim Zeitlin) 解决方案: Define DONT_ADD_PATHSEP_TO_DIR only for pure Mac. (Benji Fisher) 相关文件: src/os_mac.h Patch 6.2.037 问题: Win32: converting an encoding name to a codepage could result in an arbitrary number. 解决方案: make encname2codepage() return zero if the encoding name doesn't contain a codepage number. 相关文件: src/mbyte.c Patch 6.2.038 (extra) 问题: Warning messages when using the MingW compiler. (Bill McCarthy) Can't compile console version without +mouse feature. 解决方案: Initialize variables, add parenthesis. Add an #ifdef around g_nMouseClick. (Ajit Thakkar) 相关文件: src/eval.c, src/os_win32.c, src/gui_w32.c, src/dosinst.c Patch 6.2.039 (extra) 问题: More warning messages when using the MingW compiler. 解决方案: Initialize variables. (Bill McCarthy) 相关文件: src/os_mswin.c Patch 6.2.040 问题: FreeBSD: Crash while starting up when compiled with +xsmp feature. 解决方案: Pass a non-NULL argument to IceAddConnectionWatch(). 相关文件: src/os_unix.c Patch 6.2.041 (extra, after 6.2.033) 问题: Mac: Compiler warnings for conversion types, missing prototype, missing return type. 解决方案: Change sscanf "%hd" to "%d", the argument is an int now. Add gui_mch_init_check() prototype. Add "int" to termlib functions. 相关文件: src/gui_mac.c, src/proto/gui_mac.pro, src/termlib.c. Patch 6.2.042 (extra) 问题: Cygwin: gcc 3.2 has an optimizer problem, sometimes causing a crash. 解决方案: Add -fno-strength-reduce to the compiler arguments. (Dan Sharp) 相关文件: src/Make_cyg.mak Patch 6.2.043 问题: Compiling with both netbeans and workshop doesn't work. 解决方案: Move the shellRectangle() function to gui_x11.c. (Gordon Prieur) 相关文件: src/gui_x11.c, src/integration.c, src/netbeans.c, src/proto/netbeans.pro Patch 6.2.044 问题: ":au filetypedetect" gives an error for a non-existing event name, but it's actually a non-existing group name. (Antoine Mechelynck) 解决方案: Make the error message clearer. 相关文件: src/fileio.c Patch 6.2.045 问题: Obtaining the '( mark changes the '' mark. (Gary Holloway) 解决方案: Don't set the '' mark when searching for the start/end of the current sentence/paragraph. 相关文件: src/mark.c Patch 6.2.046 问题: When evaluating an argument of a function throws an exception the function is still called. (Hari Krishna Dara) 解决方案: Don't call the function when an exception was thrown. 相关文件: src/eval.c Patch 6.2.047 (extra) 问题: Compiler warnings when using MingW. (Bill McCarthy) 解决方案: Give the s_dwLastClickTime variable a type. Initialize dwEndTime. 相关文件: src/os_win32.c Patch 6.2.048 问题: The Python interface doesn't compile with Python 2.3 when dynamically loaded. 解决方案: Use dll_PyObject_Malloc and dll_PyObject_Free. (Paul Moore) 相关文件: src/if_python.c Patch 6.2.049 问题: Using a "-range=" argument with ":command" doesn't work and doesn't generate an error message. 解决方案: Generate an error message. 相关文件: src/ex_docmd.c Patch 6.2.050 问题: Test 32 didn't work on MS-Windows. 解决方案: Write the temp file in Unix fileformat. (Walter Briscoe) 相关文件: src/testdir/test32.in Patch 6.2.051 问题: When using "\=submatch(0)" in a ":s" command, line breaks become NUL characters. 解决方案: Change NL to CR characters, so that they become line breaks. 相关文件: src/regexp.c Patch 6.2.052 问题: A few messages are not translated. 解决方案: Add _() to the messages. (Muraoka Taro) 相关文件: src/ex_cmds.c Patch 6.2.053 问题: Prototype for bzero() doesn't match most systems. 解决方案: Use "void *" instead of "char *" and "size_t" instead of "int". 相关文件: src/osdef1.h.in Patch 6.2.054 问题: A double-byte character with a second byte that is a backslash causes problems inside a string. 解决方案: Skip over multibyte characters in a string properly. (Yasuhiro Matsumoto) 相关文件: src/eval.c Patch 6.2.055 问题: Using col('.') from CTRL-O in Insert mode does not return the correct value for multibyte characters. 解决方案: Correct the cursor position when it is necessary, move to the first byte of a multibyte character. (Yasuhiro Matsumoto) 相关文件: src/edit.c Patch 6.2.056 (extra) 问题: Building with Sniff++ doesn't work. 解决方案: Use the multi-threaded libc when needed. (Holger Ditting) 相关文件: src/Make_mvc.mak Patch 6.2.057 (extra) 问题: Mac: With -DMACOS_X putenv() is defined twice, it is in a system library. Get a warning for redefining OK. Unused variables in os_mac.c 解决方案: Define HAVE_PUTENV. Undefine OK after including curses.h. Remove declarations for unused variables. 相关文件: src/os_mac.c, src/os_mac.h, src/vim.h Patch 6.2.058 问题: When 'autochdir' is set ":bnext" to a buffer without a name causes a crash. 解决方案: Don't call vim_chdirfile() when the file name is NULL. (Taro Muraoka) 相关文件: src/buffer.c Patch 6.2.059 问题: When 'scrolloff' is a large number and listing completion results on the command line, then executing a command that jumps close to where the cursor was before, part of the screen is not updated. (Yakov Lerner) 解决方案: Don't skip redrawing part of the window when it was scrolled. 相关文件: src/screen.c Patch 6.2.060 (extra) 问题: Win32: When 'encoding' is set to "iso-8859-7" copy/paste to/from the clipboard gives a lalloc(0) error. (Kriton Kyrimis) 解决方案: When the string length is zero allocate one byte. Also fix that when the length of the Unicode text is zero (conversion from 'encoding' to UCS-2 was not possible) the normal text is used. 相关文件: src/os_mswin.c Patch 6.2.061 问题: GUI: Using the left mouse button with the shift key should work like "*" but it scrolls instead. (Martin Beller) 解决方案: Don't recognize an rxvt scroll wheel event when using the GUI. 相关文件: src/term.c Patch 6.2.062 问题: When one buffer uses a syntax with "containedin" and another buffer does not, redrawing depends on what the current buffer is. (Brett Pershing Stahlman) 解决方案: Use "syn_buf" instead of "curbuf" to get the b_syn_containedin flag. 相关文件: src/syntax.c Patch 6.2.063 问题: When using custom completion end up with no matches. 解决方案: Make cmd_numfiles and cmd_files local to completion to avoid that they are overwritten when ExpandOne() is called recursively by f_glob(). 相关文件: src/eval.c, src/ex_docmd.c, src/ex_getln.c, src/proto/ex_getln.pro, src/misc1.c, src/structs.h, src/tag.c Patch 6.2.064 问题: resolve() only handles one symbolic link, need to repeat it to resolve all of them. Then need to simplify the file name. 解决方案: Make resolve() resolve all symbolic links and simplify the result. Add simplify() to just simplify a file name. Fix that test49 doesn't work if /tmp is a symbolic link. (Servatius Brandt) 相关文件: runtime/doc/eval.txt, src/eval.c, src/tag.c, src/testdir/test49.vim Patch 6.2.065 问题: ":windo 123" only updates other windows when entering them. (Walter Briscoe) 解决方案: Update the topline before going to the next window. 相关文件: src/ex_cmds2.c Patch 6.2.066 (extra) 问题: Ruby interface doesn't work with Ruby 1.8.0. 解决方案: Change "defout" to "stdout". (Aron Griffis) Change dynamic loading. (Taro Muraoka) 相关文件: src/if_ruby.c, src/Make_mvc.mak Patch 6.2.067 问题: When searching for a string that starts with a composing character the command line isn't drawn properly. 解决方案: Don't count the space to draw the composing character on and adjust the cursor column after drawing the string. 相关文件: src/message.c Patch 6.2.068 问题: Events for the netbeans interface that include a file name with special characters don't work properly. 解决方案: Use nb_quote() on the file name. (Sergey Khorev) 相关文件: src/netbeans.c Patch 6.2.069 (after 6.2.064) 问题: Unused variables "limit" and "new_st" and unused label "fail" in some situation. (Bill McCarthy) 解决方案: Put the declarations inside an #ifdef. (Servatius Brandt) 相关文件: src/eval.c, src/tag.c Patch 6.2.070 (after 6.2.069) 问题: Still unused variable "new_st". (Bill McCarthy) 解决方案: Move the declaration to the right block this time. 相关文件: src/tag.c Patch 6.2.071 问题: 'statusline' can only contain 50 % items. (Antony Scriven) 解决方案: Allow 80 items and mention it in the docs. 相关文件: runtime/doc/option.txt, src/vim.h Patch 6.2.072 问题: When using expression folding, foldexpr() mostly returns -1 for the previous line, which makes it difficult to write a fold expression. 解决方案: Make the level of the previous line available while still looking for the end of a fold. 相关文件: src/fold.c Patch 6.2.073 问题: When adding detection of a specific filetype for a plugin you need to edit "filetype.vim". 解决方案: Source files from the "ftdetect" directory, so that a filetype detection plugin only needs to be dropped in a directory. 相关文件: runtime/doc/filetype.txt, runtime/doc/usr_05.txt, runtime/doc/usr_41.txt, runtime/filetype.vim Patch 6.2.074 问题: Warnings when compiling the Python interface. (Ajit Thakkar) 解决方案: Use ANSI function declarations. 相关文件: src/if_python.c Patch 6.2.075 问题: When the temp file for writing viminfo can't be used "NULL" appears in the error message. (Ben Lavender) 解决方案: Print the original file name when there is no temp file name. 相关文件: src/ex_cmds.c Patch 6.2.076 问题: The tags listed for cscope are in the wrong order. (Johannes Stezenbach) 解决方案: Remove the reordering of tags for the current file. (Sergey Khorev) 相关文件: src/if_cscope.c Patch 6.2.077 问题: When a user function specifies custom completion, the function gets a zero argument instead of an empty string when there is no word before the cursor. (Preben Guldberg) 解决方案: Don't convert an empty string to a zero. 相关文件: src/eval.c Patch 6.2.078 问题: "make test" doesn't work if Vim wasn't compiled yet. (Ed Avis) 解决方案: Build Vim before running the tests. 相关文件: src/Makefile Patch 6.2.079 问题: ":w ++enc=utf-8 !cmd" doesn't work. 解决方案: Check for the "++" argument before the "!". 相关文件: src/ex_docmd.c Patch 6.2.080 问题: When 't_ti' is not empty but doesn't swap screens, using "ZZ" in an unmodified file doesn't clear the last line. 解决方案: Call msg_clr_eos() when needed. (Michael Schroeder) 相关文件: src/os_unix.c Patch 6.2.081 问题: Problem when using a long multibyte string for the statusline. 解决方案: Use the right pointer to get the cell size. (Taro Muraoka) 相关文件: src/buffer.c Patch 6.2.082 问题: Can't compile with Perl 5.8.1. 解决方案: Rename "e_number" to "e_number_exp". (Sascha Blank) 相关文件: src/digraph.c, src/globals.h Patch 6.2.083 问题: When a compiler uses ^^^^ to mark a word the information is not visible in the quickfix window. (Srikanth Sankaran) 解决方案: Don't remove the indent for a line that is not recognized as an error message. 相关文件: src/quickfix.c Patch 6.2.084 问题: "g_" in Visual mode always goes to the character after the line. (Jean-Rene David) 解决方案: Ignore the NUL at the end of the line. 相关文件: src/normal.c Patch 6.2.085 问题: ":verbose set ts" doesn't say an option was set with a "-c" or "--cmd" argument. 解决方案: Remember the option was set from a Vim argument. 相关文件: src/main.c, src/ex_cmds2.c, src/vim.h Patch 6.2.086 问题: "{" and "}" stop inside a closed fold. 解决方案: Only stop once inside a closed fold. (Stephen Riehm) 相关文件: src/search.c Patch 6.2.087 问题: CTRL-^ doesn't use the 'confirm' option. Same problem with ":bnext". (Yakov Lerner) 解决方案: Put up a dialog for a changed file when 'confirm' is set in more situations. 相关文件: src/buffer.c, src/ex_cmds.c Patch 6.2.088 问题: When 'sidescrolloff' is set 'showmatch' doesn't work correctly if the match is less than 'sidescrolloff' off from the side of the window. (Roland Stahn) 解决方案: Set 'sidescrolloff' to zero while displaying the match. 相关文件: src/search.c Patch 6.2.089 问题: ":set isk+=" adds a comma. (Mark Waggoner) 解决方案: Don't add a comma when the added value is empty. 相关文件: src/option.c Patch 6.2.090 (extra) 问题: Win32: MingW compiler complains about #pragmas. (Bill McCarthy) 解决方案: Put an #ifdef around the #pragmas. 相关文件: src/os_win32.c Patch 6.2.091 问题: When an autocommand is triggered when a file is dropped on Vim and it produces output, messages from a following command may be scrolled unexpectedly. (David Rennalls) 解决方案: Save and restore msg_scroll in handle_drop(). 相关文件: src/ex_docmd.c Patch 6.2.092 问题: Invalid items appear in the help file tags. (Antonio Colombo) 解决方案: Only accept tags with white space before the first "*". 相关文件: runtime/doc/doctags.c, src/ex_cmds.c Patch 6.2.093 问题: ":nnoremenu" also defines menu for Visual mode. (Klaus Bosau) 解决方案: Check the second command character for an "o", not the third. 相关文件: src/menu.c Patch 6.2.094 问题: Can't compile with GTK and tiny features. 解决方案: Include handle_drop() and vim_chdirfile() when FEAT_DND is defined. Do not try to split the window. 相关文件: src/ex_docmd.c, src/misc2.c Patch 6.2.095 问题: The message "Cannot go to buffer x" is confusing for ":buf 6". (Frans Englich) 解决方案: Make it "Buffer x does not exist". 相关文件: src/buffer.c Patch 6.2.096 问题: Win32: ":let @* = ''" put a newline on the clipboard. (Klaus Bosau) 解决方案: Put zero bytes on the clipboard for an empty string. 相关文件: src/ops.c Patch 6.2.097 问题: Setting or resetting 'insertmode' in a BufEnter autocommand doesn't always have immediate effect. (Nagger) 解决方案: When 'insertmode' is set, set need_start_insertmode, when it's reset set stop_insert_mode. 相关文件: src/option.c Patch 6.2.098 (after 6.2.097) 问题: Can't build Vim with tiny features. (Christian J. Robinson) 解决方案: Declare stop_insert_mode always. 相关文件: src/edit.c, src/globals.h Patch 6.2.099 (extra) 问题: Test 49 fails. (Mikolaj Machowski) 解决方案: The Polish translation must not change "E116" to "R116". 相关文件: src/po/pl.po Patch 6.2.100 问题: "make proto" fails when compiled with the Perl interface. 解决方案: Remove "-fno.*" from PERL_CFLAGS, cproto sees it as its option. 相关文件: src/auto/configure, src/configure.in Patch 6.2.101 问题: When using syntax folding, opening a file slows down a lot when it's size increases by only 20%. (Gary Johnson) 解决方案: The array with cached syntax states is leaking entries. After cleaning up the list obtain the current entry again. 相关文件: src/syntax.c Patch 6.2.102 问题: The macros equal() and CR conflict with a Carbon header file. 解决方案: Rename equal() to equalpos(). Rename CR to CAR. Do this in the non-extra files only. 相关文件: src/ascii.h, src/buffer.c, src/charset.c, src/edit.c, src/eval.c, src/ex_cmds.c, src/ex_cmds2.c, src/ex_getln.c, src/fileio.c, src/getchar.c, src/gui.c, src/gui_athena.c, src/gui_gtk_x11.c, src/gui_motif.c, src/macros.h, src/mark.c, src/message.c, src/misc1.c, src/misc2.c, src/normal.c, src/ops.c, src/os_unix.c, src/regexp.c, src/search.c, src/ui.c, src/workshop.c Patch 6.2.103 (extra) 问题: The macros equal() and CR conflict with a Carbon header file. 解决方案: Rename equal() to equalpos(). Rename CR to CAR. Do this in the extra files only. 相关文件: src/gui_photon.c, src/gui_w48.c Patch 6.2.104 问题: Unmatched braces in the table with options. 解决方案: Move the "}," outside of the #ifdef. (Yakov Lerner) 相关文件: src/option.c Patch 6.2.105 问题: When the cursor is past the end of the line when calling get_c_indent() a crash might occur. 解决方案: Don't look past the end of the line. (NJ Verenini) 相关文件: src/misc1.c Patch 6.2.106 问题: Tag searching gets stuck on a very long line in the tags file. 解决方案: When skipping back to search the first matching tag remember the offset where searching started looking for a line break. 相关文件: src/tag.c Patch 6.2.107 (extra) 问题: The NetBeans interface cannot be used on Win32. 解决方案: Add support for the NetBeans for Win32. Add support for reading XPM files on Win32. Also fixes that a sign icon with a space in the file name did not work through the NetBeans interface. (Sergey Khorev) Also: avoid repeating error messages when the connection is lost. 相关文件: Makefile, runtime/doc/netbeans.txt, src/Make_bc5.mak, src/Make_cyg.mak, src/Make_ming.mak, src/Make_mvc.mak, src/bigvim.bat, src/feature.h, src/gui_beval.c, src/gui_beval.h, src/gui_w32.c, src/gui_w48.c, src/menu.c, src/nbdebug.c, src/nbdebug.h, src/netbeans.c, src/os_mswin.c, src/os_win32.h, src/proto/gui_beval.pro, src/proto/gui_w32.pro, src/proto/netbeans.pro, src/proto.h, src/version.c, src/vim.h, src/xpm_w32.c, src/xpm_w32.h Patch 6.2.108 问题: Crash when giving a message about ignoring case in a tag. (Manfred Kuehn) 解决方案: Use a longer buffer for the message. 相关文件: src/tag.c Patch 6.2.109 问题: Compiler warnings with various Amiga compilers. 解决方案: Add typecast, prototypes, et al. that are also useful for other systems. (Flavio Stanchina) 相关文件: src/eval.c, src/ops.c Patch 6.2.110 问题: When $LANG includes the encoding, a menu without an encoding name is not found. 解决方案: Also look for a menu file without any encoding. 相关文件: runtime/menu.vim Patch 6.2.111 问题: Encoding "cp1251" is not recognized. 解决方案: Add "cp1251" to the table of encodings. (Alexey Froloff) 相关文件: src/mbyte.c Patch 6.2.112 问题: After applying patches test32 fails. (Antonio Colombo) 解决方案: Have "make clean" in the testdir delete *.rej and *.orig files. Use this when doing "make clean" in the src directory. 相关文件: src/Makefile, src/testdir/Makefile Patch 6.2.113 问题: Using ":startinsert" after "$" works like "a" instead of "i". (Ajit Thakkar) 解决方案: Reset "w_curswant" for ":startinsert" and reset o_eol in edit(). 相关文件: src/edit.c, src/ex_docmd.c Patch 6.2.114 问题: When stdout is piped through "tee", the size of the screen may not be correct. 解决方案: Use stdin instead of stdout for ioctl() when stdin is a tty and stdout isn't. 相关文件: src/os_unix.c Patch 6.2.115 (extra) 问题: Compiler warnings with various Amiga compilers. 解决方案: Add typecast, prototypes, et al. Those changes that are Amiga-specific. (Flavio Stanchina) 相关文件: src/fileio.c, src/memfile.c, src/os_amiga.c, src/os_amiga.h, src/vim.h Patch 6.2.116 (extra) 问题: German keyboard with Numlock set different from system startup causes problems. 解决方案: Ignore keys with code 0xff. (Helmut Stiegler) 相关文件: src/gui_w48.c Patch 6.2.117 问题: Breakpoints in loops of sourced files and functions are not detected. (Hari Krishna Dara) 解决方案: Check for breakpoints when using lines that were previously read. (Servatius Brandt) 相关文件: src/eval.c, src/ex_cmds2.c, src/ex_docmd.c, src/proto/eval.pro, src/proto/ex_cmds2.pro Patch 6.2.118 (extra) 问题: Mac: Compiling is done in a non-standard way. 解决方案: Use the Unix method for Mac OS X, with autoconf. Add "CARBONGUI" to Makefile and configure. (Eric Kow) Move a few prototypes from os_mac.pro to gui_mac.pro. 相关文件: src/Makefile, src/auto/configure, src/configure.in, src/config.mk.in, src/gui_mac.c, src/os_mac.h, src/os_macosx.c, src/proto/gui_mac.pro, src/proto/os_mac.pro, src/infplist.xml, src/vim.h Patch 6.2.119 (after 6.2.107) 问题: When packing the MS-Windows archives a few files are missing. (Guopeng Wen) 解决方案: Add gui_beval.* to the list of generic source files. 相关文件: Makefile Patch 6.2.120 问题: Win32 GUI: The console dialogs are not supported on MS-Windows, disabling the 'c' flag of 'guioptions'. (Servatius Brandt) 解决方案: Define FEAT_CON_DIALOG also for GUI-only builds. 相关文件: src/feature.h Patch 6.2.121 (after 6.2.118) 问题: Not all make programs support "+=". (Charles Campbell) 解决方案: Use a normal assignment. 相关文件: src/Makefile Patch 6.2.122 (after 6.2.119) 问题: Not all shells can expand [^~]. File missing. (Guopeng Wen) 解决方案: Use a simpler pattern. Add the Aap recipe for the maze program and a clean version of the source code. 相关文件: Makefile, runtime/macros/maze/Makefile, runtime/macros/maze/README.txt, runtime/macros/maze/main.aap, runtime/macros/maze/mazeclean.c Patch 6.2.123 (after 6.2.118) 问题: Running configure fails. (Tony Leneis) 解决方案: Change "==" to "=" for a test. 相关文件: src/auto/configure, src/configure.in Patch 6.2.124 (after 6.2.121)(extra) 问题: Mac: Recursive use of M4FLAGS causes problems. When running Vim directly it can't find the runtime files. (Emily Jackson) Using GNU constructs causes warnings with other make programs. (Ronald Schild) 解决方案: Use another name for the M4FLAGS variable. Don't remove "Vim.app" from the path. Update the explanation for compiling on the Mac. (Eric Kow) Don't use $(shell ) and $(addprefix ). 相关文件: src/INSTALLmac.txt, src/Makefile, src/misc1.c Patch 6.2.125 (after 6.2.107) 问题: The "winsock2.h" file isn't always available. 解决方案: Don't include this header file. 相关文件: src/netbeans.c Patch 6.2.126 问题: Typing CTRL-C at a confirm() prompt doesn't throw an exception. 解决方案: Reset "mapped_ctrl_c" in get_keystroke(), so that "got_int" is set in _OnChar(). 相关文件: src/misc1.c Patch 6.2.127 (extra) 问题: Win32 console: Typing CTRL-C doesn't throw an exception. 解决方案: Set got_int immediately when CTRL-C is typed, don't wait for mch_breakcheck() being called. 相关文件: src/os_win32.c Patch 6.2.128 (after 6.2.118) 问题: src/auto/configure is not consistent with src/configure.in. 解决方案: Use the newly generated configure script. 相关文件: src/auto/configure Patch 6.2.129 问题: When 'number' is set 'wrapmargin' does not work Vi-compatible. (Yasuhiro Matsumoto) 解决方案: Reduce the textwidth when 'number' is set. Also for 'foldcolumn' and similar things. 相关文件: src/edit.c Patch 6.2.130 (extra) 问题: Win32 console: When 'restorescreen' is not set exiting Vim causes the screen to be cleared. (Michael A. Mangino) 解决方案: Don't clear the screen when exiting and 'restorescreen' isn't set. 相关文件: src/os_win32.c Patch 6.2.131 (extra) 问题: Win32: Font handles are leaked. 解决方案: Free italic, bold and bold-italic handles before overwriting them. (Michael Wookey) 相关文件: src/gui_w48.c Patch 6.2.132 (extra) 问题: Win32: console version doesn't work on latest Windows Server 2003. 解决方案: Copy 12000 instead of 15000 cells at a time to avoid running out of memory. 相关文件: src/os_win32.c Patch 6.2.133 问题: When starting the GUI a bogus error message about 'imactivatekey' may be given. 解决方案: Only check the value of 'imactivatekey' when the GUI is running. 相关文件: src/gui.c, src/option.c Patch 6.2.134 (extra) 问题: Win32: When scrolling parts of the window are redrawn when this isn't necessary. 解决方案: Only invalidate parts of the window when they are obscured by other windows. (Michael Wookey) 相关文件: src/gui_w48.c Patch 6.2.135 问题: An item <> in the ":command" argument is interpreted as <args>. 解决方案: Avoid that <> is recognized as <args>. 相关文件: src/ex_docmd.c Patch 6.2.136 问题: ":e ++enc=latin1 newfile" doesn't set 'fenc' when the file doesn't exist. (Miroslaw Dobrzanski-Neumann) 解决方案: Set 'fileencoding' to the specified encoding when editing a file that does not exist. 相关文件: src/fileio.c Patch 6.2.137 问题: "d:cmd<CR>" cannot be repeated with ".". Breaks repeating "d%" when using the matchit plugin. 解决方案: Store the command to be repeated. This is restricted to single-line commands. 相关文件: src/ex_docmd.c, src/globals.h, src/normal.c, src/vim.h Patch 6.2.138 (extra) 问题: Compilation problem on VMS with dynamic buffer on the stack. 解决方案: Read one byte less than the size of the buffer, so that we can check for the string length without an extra buffer. 相关文件: src/os_vms.c Patch 6.2.139 问题: Code is repeated in the two Perl files. 解决方案: Move common code from if_perl.xs and if_perlsfio.c to vim.h. Also fix a problem with generating prototypes. 相关文件: src/if_perl.xs, src/if_perlsfio.c, src/vim.h Patch 6.2.140 (after 6.2.121) 问题: Mac: Compiling with Python and Perl doesn't work. 解决方案: Adjust the configure check for Python to use "-framework Python" for Python 2.3 on Mac OS/X. Move "-ldl" after "DynaLoader.a" in the link command. Change "perllibs" to "PERL_LIBS". 相关文件: src/auto/configure, src/configure.in, src/config.mk.in Patch 6.2.141 (extra) 问题: Mac: The b_FSSpec field is sometimes unused. 解决方案: Change the #ifdef to FEAT_CW_EDITOR and defined it in feature.h 相关文件: src/fileio.c, src/gui_mac.c, src/structs.h, src/feature.h Patch 6.2.142 (after 6.2.124) 问题: Mac: building without GUI through configure doesn't work. When the system is slow, unpacking the resource file takes too long. 解决方案: Don't always define FEAT_GUI_MAC when MACOS is defined, define it in the Makefile. Add a configure option to skip Darwin detection. Use a Python script to unpack the resources to avoid a race condition. (Taro Muraoka) 相关文件: Makefile, src/Makefile, src/auto/configure, src/configure.in, src/dehqx.py, src/vim.h Patch 6.2.143 问题: Using "K" on Visually selected text doesn't work if it ends in a multibyte character. 解决方案: Include all the bytes of the last character. (Taro Muraoka) 相关文件: src/normal.c Patch 6.2.144 问题: When "g:html_use_css" is set the HTML header generated by the 2html script is wrong. 解决方案: Add the header after adding HREF for links. Also use ":normal!" instead of ":normal" to avoid mappings getting in the way. 相关文件: runtime/syntax/2html.vim Patch 6.2.145 (after 6.2.139) 问题: Undefining "bool" doesn't work for older systems. (Wojtek Pilorz) 解决方案: Only undefine "bool" on Mac OS. 相关文件: src/vim.h Patch 6.2.146 问题: On some systems the prototype for iconv() is wrong, causing a warning message. 解决方案: Use a cast (void *) to avoid the warning. (Charles Campbell) 相关文件: src/fileio.c, src/mbyte.c Patch 6.2.147 问题: ":s/pat/\=col('.')" always replaces with "1". 解决方案: Set the cursor to the start of the match before substituting. (Helmut Stiegler) 相关文件: src/ex_cmds.c Patch 6.2.148 问题: Can't break an Insert into several undoable parts. 解决方案: Add the CTRL-G u command. 相关文件: runtime/doc/insert.txt, src/edit.c Patch 6.2.149 问题: When the cursor is on a line past 21,474,748 the indicated percentage of the position is invalid. With that many lines "100%" causes a negative cursor line number, resulting in a crash. (Daniel Goujot) 解决方案: Divide by 100 instead of multiplying. Avoid overflow when computing the line number for "100%". 相关文件: src/buffer.c, src/ex_cmds2.c, src/normal.c Patch 6.2.150 问题: When doing "vim - < file" lines are broken at NUL chars. (Daniel Goujot) 解决方案: Change NL characters back to NUL when reading from the temp buffer. 相关文件: src/fileio.c Patch 6.2.151 问题: When doing "vim --remote +startinsert file" some commands are inserted as text. (Klaus Bosau) 解决方案: Put all the init commands in one Ex line, not using a <CR>, so that Insert mode isn't started too early. 相关文件: src/main.c Patch 6.2.152 问题: The cursor() function doesn't reset the column offset for 'virtualedit'. 解决方案: Reset the offset to zero. (Helmut Stiegler) 相关文件: src/eval.c Patch 6.2.153 问题: Win32: ":lang german" doesn't use German messages. 解决方案: Add a table to translate the Win32 language names to two-letter language codes. 相关文件: src/ex_cmds2.c Patch 6.2.154 问题: Python bails out when giving a warning message. (Eugene Minkovskii) 解决方案: Set sys.argv[] to an empty string. 相关文件: src/if_python.c Patch 6.2.155 问题: Win32: Using ":tjump www" in a help file gives two results. (Dave Roberts) 解决方案: Ignore differences between slashes and backslashes when checking for identical tag matches. 相关文件: src/tag.c Patch 6.2.156 (after 6.2.125) 问题: Win32: Netbeans fails to build, EINTR is not defined. 解决方案: Redefine EINTR to WSAEINTR. (Mike Williams) 相关文件: src/netbeans.c Patch 6.2.157 问题: Using "%p" in 'errorformat' gives a column number that is too high. 解决方案: Set the flag to use the number as a virtual column. (Lefteris Koutsoloukas) 相关文件: src/quickfix.c Patch 6.2.158 问题: The sed command on Solaris and HPUX doesn't work for a line that doesn't end in a newline. 解决方案: Add a newline when feeding text to sed. (Mark Waggoner) 相关文件: src/configure.in, src/auto/configure Patch 6.2.159 问题: When using expression folding and 'foldopen' is "undo" an undo command doesn't always open the fold. 解决方案: Save and restore the KeyTyped variable when evaluating 'foldexpr'. (Taro Muraoka) 相关文件: src/fold.c Patch 6.2.160 问题: When 'virtualedit' is "all" and 'selection' is "exclusive", selecting a double-width character below a single-width character may cause a crash. 解决方案: Avoid overflow on unsigned integer decrement. (Taro Muraoka) 相关文件: src/normal.c Patch 6.2.161 (extra) 问题: VMS: Missing header file. Reading input busy loops. 解决方案: Include termdef.h. Avoid the use of a wait function in vms_read(). (Frank Ries) 相关文件: src/os_unix.h, src/os_vms.c Patch 6.2.162 问题: ":redraw" doesn't always display the text that includes the cursor position, e.g. after ":call cursor(1, 0)". (Eugene Minkovskii) 解决方案: Call update_topline() before redrawing. 相关文件: src/ex_docmd.c Patch 6.2.163 问题: "make install" may also copy AAPDIR directories. 解决方案: Delete AAPDIR directories, just like CVS directories. 相关文件: src/Makefile Patch 6.2.164 (after 6.2.144) 问题: When "g:html_use_css" is set the HTML header generated by the 2html script is still wrong. 解决方案: Search for a string instead of jumping to a fixed line number. Go to the start of the line before inserting the header. (Jess Thrysoee) 相关文件: runtime/syntax/2html.vim Patch 6.2.165 问题: The configure checks hang when using autoconf 2.57. 解决方案: Invoke AC_PROGRAM_EGREP to set $EGREP. (Aron Griffis) 相关文件: src/auto/configure, src/configure.in Patch 6.2.166 问题: When $GZIP contains "-N" editing compressed files doesn't work properly. 解决方案: Add "-n" to "gzip -d" to avoid restoring the file name. (Oyvind Holm) 相关文件: runtime/plugin/gzip.vim Patch 6.2.167 问题: The Python interface leaks memory when assigning lines to a buffer. (Sergey Khorev) 解决方案: Do not copy the line when calling ml_replace(). 相关文件: src/if_python.c Patch 6.2.168 问题: Python interface: There is no way to get the indices from a range object. 解决方案: Add the "start" and "end" attributes. (Maurice S. Barnum) 相关文件: src/if_python.c, runtime/doc/if_pyth.txt Patch 6.2.169 问题: The prototype for _Xmblen() appears in a recent XFree86 header file, causing a warning for our prototype. (Hisashi T Fujinaka) 解决方案: Move the prototype to an osdef file, so that it's filtered out. 相关文件: src/mbyte.c, src/osdef2.h.in Patch 6.2.170 问题: When using Sun WorkShop the current directory isn't changed to where the file is. 解决方案: Set the 'autochdir' option when using WorkShop. And avoid using the basename when 'autochdir' is not set. 相关文件: src/gui_x11.c, src/ex_cmds.c Patch 6.2.171 (after 6.2.163) 问题: The "-or" argument of "find" doesn't work for SysV systems. 解决方案: Use "-o" instead. (Gordon Prieur) 相关文件: src/Makefile Patch 6.2.172 (after 6.2.169) 问题: The prototype for _Xmblen() still causes trouble. 解决方案: Include the X11 header file that defines the prototype. 相关文件: src/osdef2.h.in, src/osdef.sh Patch 6.2.173 (extra) 问题: Win32: Ruby interface doesn't work with Ruby 1.8.0 for other compilers than MSVC. 解决方案: Fix the BC5, Cygwin and Mingw makefiles. (Dan Sharp) 相关文件: src/Make_bc5.mak, src/Make_cyg.mak, src/Make_ming.mak Patch 6.2.174 问题: After the ":intro" message only a mouse click in the last line gets past the hit-return prompt. 解决方案: Accept a click at or below the hit-return prompt. 相关文件: src/gui.c, src/message.c Patch 6.2.175 问题: Changing 'backupext' in a *WritePre autocommand doesn't work. (William Natter) 解决方案: Move the use of p_bex to after executing the *WritePre autocommands. Also avoids reading allocated memory after freeing. 相关文件: src/fileio.c Patch 6.2.176 问题: Accented characters in translated help files are not handled correctly. (Fabien Vayssiere) 解决方案: Include "192-255" in 'iskeyword' for the help window. 相关文件: src/ex_cmds.c Patch 6.2.177 (extra) 问题: VisVim: Opening a file with a space in the name doesn't work. (Rob Retter) Arbitrary commands are being executed. (Neil Bird) 解决方案: Put a backslash in front of every space in the file name. (Gerard Blais) Terminate the CTRL-\ CTRL-N command with a NUL. 相关文件: src/VisVim/Commands.cpp, src/VisVim/VisVim.rc Patch 6.2.178 问题: People who don't know how to exit Vim try pressing CTRL-C. 解决方案: Give a message how to exit Vim when CTRL-C is pressed and it doesn't cancel anything. 相关文件: src/normal.c Patch 6.2.179 (extra) 问题: The en_gb messages file isn't found on case sensitive systems. 解决方案: Rename en_gb to en_GB. (Mike Williams) 相关文件: src/po/en_gb.po, src/po/en_GB.po, src/po/Make_ming.mak, src/po/Make_mvc.mak, src/po/Makefile, src/po/README_mvc.txt Patch 6.2.180 问题: Compiling with GTK2 on Win32 doesn't work. 解决方案: Include gdkwin32.h instead of gdkx.h. (Srinath Avadhanula) 相关文件: src/gui_gtk.c, src/gui_gtk_f.c, src/gui_gtk_x11.c, src/mbyte.c Patch 6.2.181 (after 6.2.171) 问题: The "-o" argument of "find" has lower priority than the implied "and" with "-print". 解决方案: Add parenthesis around the "-o" expression. (Gordon Prieur) 相关文件: src/Makefile Patch 6.2.182 (after 6.2.094) 问题: Compilation with tiny features fails because of missing get_past_head() function. 解决方案: Adjust the #ifdef for get_past_head(). 相关文件: src/misc1.c Patch 6.2.183 (after 6.2.178) 问题: Warning for char/unsigned char mixup. 解决方案: Use MSG() instead of msg(). (Tony Leneis) 相关文件: src/normal.c Patch 6.2.184 问题: With 'formatoptions' set to "1aw" inserting text may cause the paragraph to be ended. (Alan Schmitt) 解决方案: Temporarily add an extra space to make the paragraph continue after moving the word after the cursor to the next line. Also format when pressing Esc. 相关文件: src/edit.c, src/normal.c, src/proto/edit.pro Patch 6.2.185 问题: Restoring a session with zero-height windows does not work properly. (Charles Campbell) 解决方案: Accept a zero argument to ":resize" as intended. Add a window number argument to ":resize" to be able to set the size of other windows, because the current window cannot be zero-height. Fix the explorer plugin to avoid changing the window sizes. Add the winrestcmd() function for this. 相关文件: runtime/doc/eval.txt, runtime/plugin/explorer.vim, src/eval.c, src/ex_cmds.h, src/ex_docmd.c, src/proto/window.pro, src/window.c Patch 6.2.186 (after 6.2.185) 问题: Documentation file eval.txt contains examples without indent. 解决方案: Insert the indent. Also fix other mistakes. 相关文件: runtime/doc/eval.txt Patch 6.2.187 问题: Using Insure++ reveals a number of bugs. (Dominique Pelle) 解决方案: Initialize variables where needed. Free allocated memory to avoid leaks. Fix comparing tags to avoid reading past allocated memory. 相关文件: src/buffer.c, src/diff.c, src/fileio.c, src/mark.c, src/misc1.c, src/misc2.c, src/ops.c, src/option.c, src/tag.c, src/ui.c Patch 6.2.188 (extra) 问题: MS-Windows: Multi-byte characters in a filename cause trouble for the window title. 解决方案: Return when the wide function for setting the title did its work. 相关文件: src/gui_w48.c Patch 6.2.189 问题: When setting 'viminfo' after editing a new buffer its marks are not stored. (Keith Roberts) 解决方案: Set the "b_marks_read" flag when skipping to read marks from the viminfo file. 相关文件: src/fileio.c Patch 6.2.190 问题: When editing a compressed files, marks are lost. 解决方案: Add the ":lockmarks" modifier and use it in the gzip plugin. Make exists() also check for command modifiers, so that the existence of ":lockmarks" can be checked for. Also add ":keepmarks" to avoid that marks are deleted when filtering text. When deleting lines put marks 'A - 'Z and '0 - '9 at the first deleted line instead of clearing the mark. They were kept in the viminfo file anyway. Avoid that the gzip plugin puts deleted text in registers. 相关文件: runtime/doc/motion.txt, runtime/plugin/gzip.vim, src/ex_cmds.c, src/ex_docmd.c, src/mark.c, src/structs.h Patch 6.2.191 问题: The intro message is outdated. Information about sponsoring and registering is missing. 解决方案: Show info about sponsoring and registering Vim in the intro message now and then. Add help file about sponsoring. 相关文件: runtime/doc/help.txt, runtime/doc/sponsor.txt, runtime/doc/tags, runtime/menu.vim, src/version.c Patch 6.2.192 问题: Using CTRL-T and CTRL-D with "gR" messes up the text. (Jonathan Hankins) 解决方案: Avoid calling change_indent() recursively. 相关文件: src/edit.c Patch 6.2.193 问题: When recalling a search pattern from the history from a ":s,a/c," command the '/' ends the search string. (JC van Winkel) 解决方案: Store the separator character with the history entries. Escape characters when needed, replace the old separator with the new one. Also fixes that recalling a "/" search for a "?" command messes up trailing flags. 相关文件: src/eval.c, src/ex_getln.c, src/normal.c, src/proto/ex_getln.pro, src/search.c, src/tag.c Patch 6.2.194 (after 6.2.068) 问题: For NetBeans, instead of writing the file and sending an event about it, tell NetBeans to write the file. 解决方案: Add the "save" command, "netbeansBuffer" command and "buttonRelease" event to the netbeans protocol. Updated the interface to version 2.2. (Gordon Prieur) Also: open a fold when the cursor has been positioned. Also: fix memory leak, free result of nb_quote(). 相关文件: runtime/doc/netbeans.txt, src/fileio.c, src/netbeans.c, src/normal.c, src/proto/netbeans.pro, src/structs.h Patch 6.2.195 (after 6.2.190) 问题: Compiling fails for missing CPO_REMMARK symbol. 解决方案: Add the patch I forgot to include... 相关文件: src/option.h Patch 6.2.196 (after 6.2.191) 问题: Rebuilding the documentation doesn't use the sponsor.txt file. 解决方案: Add sponsor.txt to the Makefile. (Christian J. Robinson) 相关文件: runtime/doc/Makefile Patch 6.2.197 问题: It is not possible to force a redraw of status lines. (Gary Johnson) 解决方案: Add the ":redrawstatus" command. 相关文件: runtime/doc/various.txt, src/ex_cmds.h, src/ex_docmd.c, src/screen.c Patch 6.2.198 问题: A few messages are not translated. (Ernest Adrogue) 解决方案: Mark the messages to be translated. 相关文件: src/ex_cmds.c Patch 6.2.199 (after 6.2.194) 问题: Vim doesn't work perfectly well with NetBeans. 解决方案: When NetBeans saves the file, reset the timestamp to avoid "file changed" warnings. Close a buffer in a proper way. Don't try giving a debug message with an invalid pointer. Send a newDotAndMark message when needed. Report a change by the "r" command to NetBeans. (Gordon Prieur) 相关文件: src/netbeans.c, src/normal.c Patch 6.2.200 问题: When recovering a file, 'fileformat' is always the default, thus writing the file may result in differences. (Penelope Fudd) 解决方案: Before recovering the file try reading the original file to obtain the values of 'fileformat', 'fileencoding', etc. 相关文件: src/memline.c Patch 6.2.201 问题: When 'autowriteall' is set ":qall" still refuses to exit if there is a modified buffer. (Antoine Mechelynck) 解决方案: Attempt writing modified buffers as intended. 相关文件: src/ex_cmds2.c Patch 6.2.202 问题: Filetype names of CHILL and ch script are confusing. 解决方案: Rename "ch" to "chill" and "chscript" to "ch". 相关文件: runtime/filetype.vim, runtime/makemenu.vim, runtime/synmenu.vim runtime/syntax/ch.vim, runtime/syntax/chill.vim Patch 6.2.203 问题: With characterwise text that has more than one line, "3P" works wrong. "3p" has the same problem. There also is a display problem. (Daniel Goujot) 解决方案: Perform characterwise puts with a count in the right position. 相关文件: src/ops.c Patch 6.2.204 (after 6.2.086) 问题: "]]" in a file with closed folds moves to the end of the file. (Nam SungHyun) 解决方案: Find one position in each closed fold, then move to after the fold. 相关文件: src/search.c Patch 6.2.205 (extra) 问题: MS-Windows: When the taskbar is at the left or top of the screen, the Vim window placement is wrong. 解决方案: Compute the size and position of the window correctly. (Taro Muraoka) 相关文件: src/gui_w32.c, src/gui_w48.c Patch 6.2.206 问题: Multi-byte characters cannot be used as hotkeys in a console dialog. (Mattias Erkisson) 解决方案: Handle multibyte characters properly. Also put () or [] around default hotkeys. 相关文件: src/message.c, src/macros.h Patch 6.2.207 问题: When 'encoding' is a multibyte encoding, expanding an abbreviation that starts where insertion started results in characters before the insertion to be deleted. (Xiangjiang Ma) 解决方案: Stop searching leftwards for the start of the word at the position where insertion started. 相关文件: src/getchar.c Patch 6.2.208 问题: When using fold markers, three lines in a row have the start marker and deleting the first one with "dd", a nested fold is not deleted. (Kamil Burzynski) Using marker folding, a level 1 fold doesn't stop when it is followed by "{{{2", starting a level 2 fold. 解决方案: Don't stop updating folds at the end of a change when the nesting level of folds is larger than the fold level. Correctly compute the number of folds that start at "{{{2". Also avoid a crash for a NULL pointer. 相关文件: src/fold.c Patch 6.2.209 问题: A bogus fold is created when using "P" while the cursor is in the middle of a closed fold. (Kamil Burzynski) 解决方案: Correct the line number where marks are modified for closed folds. 相关文件: src/ops.c Patch 6.2.210 (extra) 问题: Mac OSX: antialiased fonts are not supported. 解决方案: Add the 'antialias' option to switch on antialiasing on Mac OSX 10.2 and later. (Peter Cucka) 相关文件: runtime/doc/options.txt, src/gui_mac.c, src/option.h, src/option.c Patch 6.2.211 (extra) 问题: Code for handling file dropped on Vim is duplicated. 解决方案: Move the common code to gui_handle_drop(). Add code to drop the files in the window under the cursor. Support drag&drop on the Macintosh. (Taro Muraoka) When dropping a directory name edit that directory (using the explorer plugin) Fix that changing directory with Shift pressed didn't work for relative path names. 相关文件: src/fileio.c, src/gui.c, src/gui_gtk_x11.c, src/gui_mac.c, src/gui_w48.c, src/proto/fileio.pro, src/proto/gui.pro Patch 6.2.212 (after 6.2.199) 问题: NetBeans: Replacing with a count is not handled correctly. 解决方案: Move reporting the change outside of the loop for the count. (Gordon Prieur) 相关文件: src/normal.c Patch 6.2.213 (after 6.2.208) 问题: Using marker folding, "{{{1" doesn't start a new fold when already at fold level 1. (Servatius Brandt) 解决方案: Correctly compute the number of folds that start at "{{{1". 相关文件: src/fold.c Patch 6.2.214 (after 6.2.211) (extra) 问题: Warning for an unused variable. 解决方案: Delete the declaration. (Bill McCarthy) 相关文件: src/gui_w48.c Patch 6.2.215 问题: NetBeans: problems saving an unmodified file. 解决方案: Add isNetbeansModified() function. Disable netbeans_unmodified(). (Gordon Prieur) 相关文件: src/fileio.c, src/netbeans.c, src/proto/netbeans.pro, runtime/doc/netbeans.txt, runtime/doc/tags Patch 6.2.216 (after 6.2.206) 问题: Multi-byte characters still cannot be used as hotkeys in a console dialog. (Mattias Erkisson) 解决方案: Make get_keystroke() handle multibyte characters. 相关文件: src/misc1.c Patch 6.2.217 问题: GTK: setting the title doesn't always work correctly. 解决方案: Invoke gui_mch_settitle(). (Tomas Stehlik) 相关文件: src/os_unix.c Patch 6.2.218 问题: Warning for function without prototype. 解决方案: Add argument types to the msgCB field of the BalloonEval struct. 相关文件: src/gui_beval.h Patch 6.2.219 问题: Syntax highlighting hangs on an empty match of an item with a nextgroup. (Charles Campbell) 解决方案: Remember that the item has already matched and don't match it again at the same position. 相关文件: src/syntax.c Patch 6.2.220 问题: When a Vim server runs in a console a remote command isn't handled before a key is typed. (Joshua Neuheisel) 解决方案: Don't try reading more input when a client-server command has been received. 相关文件: src/os_unix.c Patch 6.2.221 问题: No file name completion for ":cscope add". 解决方案: Add the XFILE flag to ":cscope". (Gary Johnson) 相关文件: src/ex_cmds.h Patch 6.2.222 问题: Using "--remote" several times on a row only opens some of the files. (Dany St-Amant) 解决方案: Don't delete all typeahead when the server receives a command from a client, only delete typed characters. 相关文件: src/main.c Patch 6.2.223 问题: Cscope: Avoid a hang when cscope waits for a response while Vim waits for a prompt. Error messages from Cscope mess up the display. 解决方案: Detect the hit-enter message and respond by sending a return character to cscope. (Gary Johnson) Use EMSG() and strerror() when possible. Replace perror() with PERROR() everywhere, add emsg3(). 相关文件: src/diff.c, src/if_cscope.c, src/integration.c, src/message.c, src/proto/message.pro, src/misc2.c, src/netbeans.c, src/vim.h Patch 6.2.224 问题: Mac: Can't compile with small features. (Axel Kielhorn) 解决方案: Also include vim_chdirfile() when compiling for the Mac. 相关文件: src/misc2.c Patch 6.2.225 问题: NetBeans: Reported modified state isn't exactly right. 解决方案: Report a file being modified in the NetBeans way. 相关文件: src/netbeans.c Patch 6.2.226 (after 6.2.107) (extra) 问题: The "ws2-32.lib" file isn't always available. 解决方案: Use "WSock32.lib" instead. (Taro Muraoka, Dan Sharp) 相关文件: src/Make_cyg.mak, src/Make_ming.mak, src/Make_mvc.mak Patch 6.2.227 (extra) 问题: The "PC" symbol is defined but not used anywhere. 解决方案: Remove "-DPC" from the makefiles. 相关文件: src/Make_bc3.mak, src/Make_bc5.mak, src/Make_cyg.mak, src/Make_ming.mak Patch 6.2.228 问题: Receiving CTRL-\ CTRL-N after typing "f" or "m" doesn't switch Vim back to Normal mode. Same for CTRL-\ CTRL-G. 解决方案: Check if the character typed after a command is CTRL-\ and obtain another character to check for CTRL-N or CTRL-G, waiting up to 'ttimeoutlen' msec. 相关文件: src/normal.c Patch 6.2.229 问题: ":function" with a name that uses magic curlies does not work inside a function. (Servatius Brandt) 解决方案: Skip over the function name properly. 相关文件: src/eval.c Patch 6.2.230 (extra) 问题: Win32: a complex pattern may cause a crash. 解决方案: Use __try and __except to catch the exception and handle it gracefully, when possible. Add myresetstkoflw() to reset the stack overflow. (Benjamin Peterson) 相关文件: src/Make_bc5.mak, src/os_mswin.c src/os_win32.c, src/os_win32.h, src/proto/os_win32.pro, src/regexp.c Patch 6.2.231 (after 6.2.046) 问题: Various problems when an error exception is raised from within a builtin function. When it is invoked while evaluating arguments to a function following arguments are still evaluated. When invoked with a line range it will be called for remaining lines. 解决方案: Update "force_abort" also after calling a builtin function, so that aborting() always returns the correct value. (Servatius Brandt) 相关文件: src/eval.c, src/ex_eval.c, src/proto/ex_eval.pro, src/testdir/test49.ok, src/testdir/test49.vim Patch 6.2.232 问题: ":python vim.command('python print 2*2')" crashes Vim. (Eugene Minkovskii) 解决方案: Disallow executing a Python command recursively and give an error message. 相关文件: src/if_python.c Patch 6.2.233 问题: On Mac OSX adding -pthread for Python only generates a warning. The test for Perl threads rejects Perl while it's OK. Tcl doesn't work at all. The test for Ruby fails if ruby exists but there are no header files. The Ruby library isn't detected properly 解决方案: Avoid adding -pthread on Mac OSX. Accept Perl threads when it's not the 5.5 threads. Use the Tcl framework for header files. For Ruby rename cWindow to cVimWindow to avoid a name clash. (Ken Scott) Only enable Ruby when the header files can be found. Use "-lruby" instead of "libruby.a" when it can't be found. 相关文件: src/auto/configure, src/configure.in, src/if_ruby.c Patch 6.2.234 问题: GTK 2 GUI: ":sp" and the ":q" leaves the cursor on the command line. 解决方案: Flush output before removing scrollbars. Also do this in other places where gui_mch_*() functions are invoked. 相关文件: src/ex_cmds.c, src/option.c, src/window.c Patch 6.2.235 (extra) 问题: Win32: Cursor isn't removed with a 25x80 window and doing: "1830ia<Esc>400a-<Esc>0w0". (Yasuhiro Matsumoto) 解决方案: Remove the call to gui_undraw_cursor() from gui_mch_insert_lines(). 相关文件: src/gui_w48.c Patch 6.2.236 问题: Using gvim with Agide gives "connection lost" error messages. 解决方案: Only give the "connection lost" message when the buffer was once owned by NetBeans. 相关文件: src/netbeans.c, src/structs.h Patch 6.2.237 问题: GTK 2: Thai text is drawn wrong. It changes when moving the cursor over it. 解决方案: Disable the shaping engine, it moves combining characters to a wrong position and combines characters, while drawing the cursor doesn't combine characters. 相关文件: src/gui_gtk_x11.c Patch 6.2.238 (after 6.2.231) 问题: ":function" does not work inside a while loop. (Servatius Brandt) 解决方案: Add get_while_line() and pass it to do_one_cmd() when in a while loop, so that all lines are stored and can be used again when repeating the loop. Adjust test 49 so that it checks for the fixed problems. (Servatius Brandt) 相关文件: src/digraph.c, src/ex_cmds2.c, src/ex_docmd.c, src/ex_eval.c, src/proto/ex_cmds2.pro, src/proto/ex_docmd.pro, src/testdir/test49.in, src/testdir/test49.ok, src/testdir/test49.vim Patch 6.2.239 问题: GTK 2: With closed folds the arrow buttons of a vertical scrollbar often doesn't scroll. (Moshe Kaminsky) 解决方案: Hackish solution: Detect that the button was pressed from the mouse pointer position. 相关文件: src/gui_gtk.c, src/gui.c Patch 6.2.240 问题: GTK 2: Searching for bitmaps for the toolbar doesn't work as with other systems. Need to explicitly use "icon=name". (Ned Konz, Christian J. Robinson) 解决方案: Search for icons like done for Motif. 相关文件: src/gui_gtk.c Patch 6.2.241 问题: GTK 2: Search and Search/Replace dialogs are synced, that makes no sense. Buttons are sometimes greyed-out. (Jeremy Messenger) 解决方案: Remove the code to sync the two dialogs. Adjust the code to react to an empty search string to also work for GTK2. (David Necas) 相关文件: src/gui_gtk.c Patch 6.2.242 问题: Gnome: "vim --help" only shows the Gnome arguments, not the Vim arguments. 解决方案: Don't let the Gnome code remove the "--help" argument and don't exit at the end of usage(). 相关文件: src/gui_gtk_x11.c, src/main.c Patch 6.2.243 (extra) 问题: Mac: Dropping a file on a Vim icon causes a hit-enter prompt. 解决方案: Move the dropped files to the global argument list, instead of the usual drop handling. (Eckehard Berns) 相关文件: src/main.c, src/gui_mac.c Patch 6.2.244 问题: ':echo "\xf7"' displays the illegal byte as if it was a character and leaves "cho" after it. 解决方案: When checking the length of a UTF-8 byte sequence and it's shorter than the number of bytes available, assume it's an illegal byte. 相关文件: src/mbyte.c Patch 6.2.245 问题: Completion doesn't work for ":keepmarks" and ":lockmarks". 解决方案: Add the command modifiers to the table of commands. (Madoka Machitani) 相关文件: src/ex_cmds.h, src/ex_docmd.c Patch 6.2.246 问题: Mac: Starting Vim from Finder doesn't show error messages. 解决方案: Recognize that output is being displayed by stderr being "/dev/console". (Eckehard Berns) 相关文件: src/main.c, src/message.c Patch 6.2.247 (after 6.2.193) 问题: When using a search pattern from the viminfo file the last character is replaced with a '/'. 解决方案: Store the separator character in the right place. (Kelvin Lee) 相关文件: src/ex_getln.c Patch 6.2.248 问题: GTK: When XIM is enabled normal "2" and keypad "2" cannot be distinguished. 解决方案: Detect that XIM changes the keypad key to the expected ASCII character and fall back to the non-XIM code. (Neil Bird) 相关文件: src/gui_gtk_x11.c, src/mbyte.c, src/proto/mbyte.pro Patch 6.2.249 问题: ":cnext" moves to the error in the next file, but there is no method to go back. 解决方案: Add ":cpfile" and ":cNfile". 相关文件: src/ex_cmds.h, src/quickfix.c, src/vim.h, runtime/doc/quickfix.txt Patch 6.2.250 问题: Memory leaks when using signs. (Xavier de Gaye) 解决方案: Delete the list of signs when unloading a buffer. 相关文件: src/buffer.c Patch 6.2.251 问题: GTK: The 'v' flag in 'guioptions' doesn't work. (Steve Hall) Order of buttons is reversed for GTK 2.2.4. Don't always get focus back after handling a dialog. 解决方案: Make buttons appear vertically when desired. Reverse the order in which buttons are added to a dialog. Move mouse pointer around when the dialog is done and we don't have focus. 相关文件: src/gui_gtk.c Patch 6.2.252 (extra, after 6.2.243) 问题: Mac: Dropping a file on a Vim icon causes a hit-enter prompt for Mac OS classic. 解决方案: Remove the #ifdef from the code that fixes it for Mac OSX. 相关文件: src/gui_mac.c Patch 6.2.253 问题: When 'tagstack' is not set a ":tag id" command does not work after a ":tjump" command. 解决方案: Set "new_tag" when 'tagstack' isn't set. (G. Narendran) 相关文件: src/tag.c Patch 6.2.254 问题: May run out of space for error messages. 解决方案: Keep room for two more bytes. 相关文件: src/quickfix.c Patch 6.2.255 问题: GTK: A new item in the popup menu is put just after instead of just before the right item. (Gabriel Zachmann) 解决方案: Don't increment the menu item index. 相关文件: src/gui_gtk.c Patch 6.2.256 问题: Mac: "macroman" encoding isn't recognized, need to use "8bit-macroman". 解决方案: Recognize "macroman" with an alias "mac". (Eckehard Berns) 相关文件: src/mbyte.c Patch 6.2.257 (after 6.2.250) 问题: Signs are deleted for ":bdel", but they could still be useful. 解决方案: Delete signs only for ":bwipe". 相关文件: src/buffer.c Patch 6.2.258 问题: GUI: can't disable (grey-out) a popup menu item. (Ajit Thakkar) 解决方案: Loop over the popup menus for all modes. 相关文件: src/menu.c Patch 6.2.259 问题: If there are messages when exiting, on the console there is a hit-enter prompt while the message can be read; in the GUI the message may not be visible. 解决方案: Use the hit-enter prompt when there is an error message from writing the viminfo file or autocommands, or when there is any output in the GUI and 'verbose' is set. Don't use a hit-enter prompt for the non-GUI version unless there is an error message. 相关文件: src/main.c Patch 6.2.260 问题: GTK 2: Can't quit a dialog with <Esc>. GTK 1 and 2: <Enter> always gives a result, even when the default button has been disabled. 解决方案: Handle these keys explicitly. When no default button is specified use the first one (works mostly like it was before). 相关文件: src/gui_gtk.c Patch 6.2.261 问题: When 'autoindent' and 'cindent' are set and a line is recognized as a comment, starting a new line won't do 'cindent' formatting. 解决方案: Also use 'cindent' formatting for lines that are used as a comment. (Servatius Brandt) 相关文件: src/misc1.c Patch 6.2.262 问题: 1 CTRL-W w beeps, even though going to the first window is possible. (Charles Campbell) 解决方案: Don't beep. 相关文件: src/window.c Patch 6.2.263 问题: Lint warnings: Duplicate function prototypes, duplicate macros, use of a zero character instead of a zero pointer, unused variable. Clearing allocated memory in a complicated way. 解决方案: Remove the function prototypes from farsi.h. Remove the duplicated lines in keymap.h. Change getvcol() argument from NUL to NULL. Remove the "col" variable in regmatch(). Use lalloc_clear() instead of lalloc(). (Walter Briscoe) 相关文件: src/farsi.h, src/keymap.h, src/ops.c, src/regexp.c, src/search.c Patch 6.2.264 (after 6.2.247) 问题: Writing past allocated memory when using a command line from the viminfo file. 解决方案: Store the NUL in the right place. 相关文件: src/ex_getln.c Patch 6.2.265 问题: Although ":set" is not allowed in the sandbox, ":let &opt = val" works. 解决方案: Do allow changing options in the sandbox, but not the ones that can't be changed from a modeline. 相关文件: src/ex_cmds.h, src/options.c Patch 6.2.266 问题: When redirecting output and using ":silent", line breaks are missing from output of ":map" and ":tselect". Alignment of columns is wrong. 解决方案: Insert a line break where "msg_didout" was tested. Update msg_col when redirecting and using ":silent". 相关文件: src/getchar.c, src/message.c Patch 6.2.267 (extra) 问题: Win32: "&&" in a tearoff menu is not shown. (Luc Hermitte) 解决方案: Use the "name" item from the menu instead of the "dname" item. 相关文件: src/gui_w32.c, src/menu.c Patch 6.2.268 问题: GUI: When changing 'guioptions' part of the window may be off screen. (Randall Morris) 解决方案: Adjust the size of the window when changing 'guioptions', but only when adding something. 相关文件: src/gui.c Patch 6.2.269 问题: Diff mode does not highlight a change in a combining character. (Raphael Finkel) 解决方案: Make diff_find_change() multibyte aware: find the start byte of a character that contains a change. 相关文件: src/diff.c Patch 6.2.270 问题: Completion in Insert mode, then repeating with ".", doesn't handle composing characters in the completed text. (Raphael Finkel) 解决方案: Don't skip over composing chars when adding completed text to the redo buffer. 相关文件: src/getchar.c Patch 6.2.271 问题: NetBeans: Can't do "tail -f" on the log. Passing socket info with an argument or environment variable is not secure. 解决方案: Wait after initializing the log. Allow passing the socket info through a file. (Gordon Prieur) 相关文件: runtime/doc/netbeans.txt, src/main.c, src/netbeans.c Patch 6.2.272 问题: When the "po" directory exists, but "po/Makefile" doesn't, building fails. Make loops when the "po" directory has been deleted after running configure. 解决方案: Check for the "po/Makefile" instead of just the "po" directory. Check this again before trying to run make with that Makefile. 相关文件: src/auto/configure, src/configure.in, src/Makefile Patch 6.2.273 问题: Changing the sort order in an explorer window for an empty directory produces error messages. (Doug Kearns) 解决方案: When an invalid range is used for a function that is not going to be executed, skip over the arguments anyway. 相关文件: src/eval.c Patch 6.2.274 问题: ":print" skips empty lines when 'list' is set and there is no "eol" in 'listchars'. (Yakov Lerner) 解决方案: Skip outputting a space for an empty line only when 'list' is set and the end-of-line character is not empty. 相关文件: src/message.c Patch 6.2.275 (extra, after 6.2.267) 问题: Warning for uninitialized variable when using gcc. 解决方案: Initialize "acLen" to zero. (Bill McCarthy) 相关文件: src/gui_w32.c Patch 6.2.276 问题: ":echo X()" does not put a line break between the message that X() displays and the text that X() returns. (Yakov Lerner) 解决方案: Invoke msg_start() after evaluating the argument. 相关文件: src/eval.c Patch 6.2.277 问题: Vim crashes when a ":runtime ftplugin/ada.vim" causes a recursive loop. (Robert Nowotniak) 解决方案: Restore "msg_list" before returning from do_cmdline(). 相关文件: src/ex_docmd.c Patch 6.2.278 问题: Using "much" instead of "many". 解决方案: Correct the error message. 相关文件: src/eval.c Patch 6.2.279 问题: There is no default choice for a confirm() dialog, now that it is possible not to have a default choice. 解决方案: Make the first choice the default choice. 相关文件: runtime/doc/eval.txt, src/eval.c Patch 6.2.280 问题: "do" and ":diffget" don't work in the first line and the last line of a buffer. (Aron Griffis) 解决方案: Find a difference above the first line and below the last line. Also fix a few display updating bugs. 相关文件: src/diff.c, src/fold.c, src/move.c Patch 6.2.281 问题: PostScript printing doesn't work on Mac OS X 10.3.2. 解决方案: Adjust the header file. (Mike Williams) 相关文件: runtime/print/prolog.ps Patch 6.2.282 问题: When using CTRL-O to go back to a help file, it becomes listed. (Andrew Nesbit) Using ":tag" or ":tjump" in a help file doesn't keep the help file settings (e.g. for 'iskeyword'). 解决方案: Don't mark a buffer as listed when its help flag is set. Put all the option settings for a help buffer together in do_ecmd(). 相关文件: src/ex_cmds.c Patch 6.2.283 问题: The "local additions" in help.txt are used without conversion, causing latin1 characters showing up wrong when 'enc' is utf-8. (Antoine J. Mechelynck) 解决方案: Convert the text to 'encoding'. 相关文件: src/ex_cmds.c Patch 6.2.284 问题: Listing a function puts "endfunction" in the message history. Typing "q" at the more prompt isn't handled correctly when listing variables and functions. (Hara Krishna Dara) 解决方案: Don't use msg() for "endfunction". Check "got_int" regularly. 相关文件: src/eval.c Patch 6.2.285 问题: GUI: In a single wrapped line that fills the window, "gj" in the last screen line leaves the cursor behind. (Ivan Tarasov) 解决方案: Undraw the cursor before scrolling the text up. 相关文件: src/gui.c Patch 6.2.286 问题: When trying to rename a file and it doesn't exist, the destination file is deleted anyway. (Luc Deux) 解决方案: Don't delete the destination when the source doesn't exist. (Taro Muraoka) 相关文件: src/fileio.c Patch 6.2.287 (after 6.2.264) 问题: Duplicate lines are added to the viminfo file. 解决方案: Compare with existing entries without an offset. Also fixes reading very long history lines from viminfo. 相关文件: src/ex_getln.c Patch 6.2.288 (extra) 问题: Mac: An external program can't be interrupted. 解决方案: Don't use the 'c' key for backspace. (Eckehard Berns) 相关文件: src/gui_mac.c Patch 6.2.289 问题: Compiling the Tcl interface with thread support causes ":make" to fail. (Juergen Salk) 解决方案: Use $TCL_DEFS from the Tcl config script to obtain the required compile flags for using the thread library. 相关文件: src/auto/configure, src/configure.in Patch 6.2.290 (extra) 问题: Mac: The mousewheel doesn't work. 解决方案: Add mousewheel support. Also fix updating the thumb after a drag and then using another way to scroll. (Eckehard Berns) 相关文件: src/gui_mac.c Patch 6.2.291 (extra) 问题: Mac: the plus button and close button don't do anything. 解决方案: Make the plus button maximize the window and the close button close Vim. (Eckehard Berns) 相关文件: src/gui.c, src/gui_mac.c Patch 6.2.292 问题: Motif: When removing GUI arguments from argv[] a "ps -ef" shows the last argument repeated. 解决方案: Set argv[argc] to NULL. (Michael Jarvis) 相关文件: src/gui_x11.c Patch 6.2.293 (after 6.2.255) 问题: GTK: A new item in a menu is put before the tearoff item. 解决方案: Do increment the menu item index for non-popup menu items. 相关文件: src/gui_gtk.c Patch 6.2.294 (extra) 问题: Mac: Cannot use modifiers with Space, Tab, Enter and Escape. 解决方案: Handle all modifiers for these keys. (Eckehard Berns) 相关文件: src/gui_mac.c Patch 6.2.295 问题: When in debug mode, receiving a message from a remote client causes a crash. Evaluating an expression causes Vim to wait for "cont" to be typed, without a prompt. (Hari Krishna Dara) 解决方案: Disable debugging when evaluating an expression for a client. (Michael Geddes) Don't try reading into the typeahead buffer when it may have been filled in another way. 相关文件: src/ex_getln.c, src/getchar.c, src/if_xcmdsrv.c, src/main.c, src/misc1.c, src/proto/getchar.pro, src/proto/main.pro, src/proto/os_unix.pro, src/proto/ui.pro, src/structs.h, src/os_unix.c, src/ui.c Patch 6.2.296 (extra) 问题: Same as 6.2.295. 解决方案: Extra files for patch 6.2.295. 相关文件: src/os_amiga.c, src/os_msdos.c, src/os_riscos.c, src/os_win32.c, src/proto/os_amiga.pro, src/proto/os_msdos.pro, src/proto/os_riscos.pro, src/proto/os_win32.pro Patch 6.2.297 (after 6.2.232) 问题: Cannot invoke Python commands recursively. 解决方案: With Python 2.3 and later use the available mechanisms to invoke Python recursively. (Matthew Mueller) 相关文件: src/if_python.c Patch 6.2.298 问题: A change always sets the '. mark and an insert always sets the '^ mark, even when this is not wanted. Cannot go back to the position of older changes without undoing those changes. 解决方案: Add the ":keepjumps" command modifier. Add the "g," and "g;" commands. 相关文件: runtime/doc/motion.txt, src/ex_cmds.h, src/ex_docmd.c, src/edit.c, src/mark.c, src/misc1.c, src/normal.c, src/proto/mark.pro, src/structs.h, src/undo.c Patch 6.2.299 问题: Can only use one language for help files. 解决方案: Add the 'helplang' option to select the preferred language(s). Make ":helptags" generate tags files for all languages. 相关文件: runtime/doc/options.txt, runtime/doc/various.txt, src/Makefile, src/ex_cmds.c, src/ex_cmds2.c, src/ex_cmds.h, src/ex_getln.c, src/normal.c, src/option.c, src/option.h, src/proto/ex_cmds.pro, src/proto/ex_cmds2.pro, src/proto/option.pro, src/structs.h, src/tag.c, src/vim.h Patch 6.2.300 (after 6.2.297) 问题: Cannot build Python interface with Python 2.2 or earlier. 解决方案: Add a semicolon. 相关文件: src/if_python.c Patch 6.2.301 问题: The "select all" item from the popup menu doesn't work for Select mode. 解决方案: Use the same commands as for the "Edit.select all" menu. (Benji Fisher) 相关文件: runtime/menu.vim Patch 6.2.302 问题: Using "CTRL-O ." in Insert mode doesn't work properly. (Benji Fisher) 解决方案: Restore "restart_edit" after an insert command that was not typed. Avoid waiting with displaying the mode when there is no text to be overwritten. Fix that "CTRL-O ." sometimes doesn't put the cursor back after the end-of-line. Only reset the flag that CTRL-O was used past the end of the line when restarting editing. Update "o_lnum" number when inserting text and "o_eol" is set. 相关文件: src/edit.c, src/normal.c Patch 6.2.303 问题: Cannot use Unicode digraphs while 'encoding' is not Unicode. 解决方案: Convert the character from Unicode to 'encoding' when needed. Use the Unicode digraphs for the Macintosh. (Eckehard Berns) 相关文件: src/digraph.c Patch 6.2.304 (extra, after 6.2.256) 问题: Mac: No proper support for 'encoding'. Conversion without iconv() is not possible. 解决方案: Convert input from 'termencoding' to 'encoding'. Add mac_string_convert(). Convert text for the clipboard when needed. (Eckehard Berns) 相关文件: src/gui_mac.c, src/mbyte.c, src/structs.h, src/vim.h Patch 6.2.305 (after 6.2.300) 问题: Win32: Cannot build Python interface with Python 2.3. (Ajit Thakkar) 解决方案: Add two functions to the dynamic loading feature. 相关文件: src/if_python.c Patch 6.2.306 (extra) 问题: Win32: Building console version with BCC 5.5 gives a warning for get_cmd_args() prototype missing. (Ajit Thakkar) 解决方案: Don't build os_w32exe.c for the console version. 相关文件: src/Make_bc5.mak Patch 6.2.307 (after 6.2.299) 问题: Installing help files fails. 解决方案: Expand wildcards for translated help files separately. 相关文件: src/Makefile Patch 6.2.308 问题: Not all systems have "whoami", resulting in an empty user name. 解决方案: Use "logname" when possible, "whoami" otherwise. (David Boyce) 相关文件: src/Makefile Patch 6.2.309 问题: "3grx" waits for two ESC to be typed. (Jens Paulus) 解决方案: Append the ESC to the stuff buffer when redoing the "gr" insert. 相关文件: src/edit.c Patch 6.2.310 问题: When setting 'undolevels' to -1, making a change and setting 'undolevels' to a positive value an "undo list corrupt" error occurs. (Madoka Machitani) 解决方案: Sync undo before changing 'undolevels'. 相关文件: src/option.c Patch 6.2.311 (after 6.2.298) 问题: When making several changes in one line the changelist grows quickly. There is no error message for reaching the end of the changelist. Reading changelist marks from viminfo doesn't work properly. 解决方案: Only make a new entry in the changelist when making a change in another line or 'textwidth' columns away. Add E662, E663 and E664 error messages. Put a changelist mark from viminfo one position before the end. 相关文件: runtime/doc/motion.txt, src/mark.c, src/misc1.c, src/normal.c Patch 6.2.312 (after 6.2.299) 问题: "make install" clears the screen when installing the docs. 解决方案: Execute ":helptags" in silent mode. 相关文件: runtime/doc/Makefile Patch 6.2.313 问题: When opening folds in a diff window, other diff windows no longer show the same text. 解决方案: Sync the folds in diff windows. 相关文件: src/diff.c, src/fold.c, src/move.c, src/proto/diff.pro, src/proto/move.pro Patch 6.2.314 问题: When 'virtualedit' is set "rx" may cause a crash with a blockwise selection and using "$". (Moritz Orbach) 解决方案: Don't try replacing chars in a line that has no characters in the block. 相关文件: src/ops.c Patch 6.2.315 问题: Using CTRL-C in a Visual mode mapping while 'insertmode' is set stops Vim from returning to Insert mode. 解决方案: Don't reset "restart_edit" when a CTRL-C is found and 'insertmode' is set. 相关文件: src/normal.c Patch 6.2.316 (after 6.2.312) 问题: "make install" tries connecting to the X server when installing the docs. (Stephen Thomas) 解决方案: Add the "-X" argument. 相关文件: runtime/doc/Makefile Patch 6.2.317 (after 6.2.313) 问题: When using "zi" in a diff window, other diff windows are not adjusted. (Richard Curnow) 解决方案: Distribute a change in 'foldenable' to other diff windows. 相关文件: src/normal.c Patch 6.2.318 问题: When compiling with _THREAD_SAFE external commands don't echo typed characters. 解决方案: Don't set the terminal mode to TMODE_SLEEP when it's already at TMODE_COOK. 相关文件: src/os_unix.c Patch 6.2.319 (extra) 问题: Building gvimext.dll with Mingw doesn't work properly. 解决方案: Use gcc instead of dllwrap. Use long option names. (Alejandro Lopez-Valencia) 相关文件: src/GvimExt/Make_ming.mak Patch 6.2.320 问题: Win32: Adding and removing the menubar resizes the Vim window. (Jonathon Merz) 解决方案: Don't let a resize event change 'lines' unexpectedly. 相关文件: src/gui.c Patch 6.2.321 问题: When using modeless selection, wrapping lines are not recognized, a line break is always inserted. 解决方案: Add LineWraps[] to remember whether a line wrapped or not. 相关文件: src/globals.h, src/screen.c, src/ui.c Patch 6.2.322 问题: With 'showcmd' set, after typing "dd" the next "d" may not be displayed. (Jens Paulus) 解决方案: Redraw the command line after updating the screen, scrolling may have set "clear_cmdline". 相关文件: src/screen.c Patch 6.2.323 问题: Win32: expanding "~/file" in an autocommand pattern results in backslashes, while this pattern should only have forward slashes. 解决方案: Make expanding environment variables respect 'shellslash' and set p_ssl when expanding the autocommand pattern. 相关文件: src/fileio.c, src/misc1.c, src/proto/fileio.pro Patch 6.2.324 (extra) 问题: Win32: when "vimrun.exe" has a path with white space, such as "Program Files", executing external commands may fail. 解决方案: Put double quotes around the path to "vimrun". 相关文件: src/os_win32.c Patch 6.2.325 问题: When $HOME includes a space, doing ":set tags=~/tags" doesn't work, the space is used to separate file names. (Brett Stahlman) 解决方案: Escape the space with a backslash. 相关文件: src/option.c Patch 6.2.326 问题: ":windo set syntax=foo" doesn't work. (Tim Chase) 解决方案: Don't change 'eventignore' for ":windo". 相关文件: src/ex_cmds2.c Patch 6.2.327 问题: When formatting text all marks in the formatted lines are lost. A word is not joined to a previous line when this would be possible. (Mikolaj Machowski) 解决方案: Try to keep marks in the same position as much as possible. Also keep mark positions when joining lines. Start auto-formatting in the previous line when appropriate. Add the "gw" operator: Like "gq" but keep the cursor where it is. 相关文件: runtime/doc/change.txt, src/edit.c, src/globals.h, src/mark.c, src/misc1.c, src/normal.c, src/ops.c, src/proto/edit.pro, src/proto/mark.pro, src/proto/ops.pro, src/structs.h, src/vim.h Patch 6.2.328 问题: XIM with GTK: It is hard to understand what XIM is doing. 解决方案: Add xim_log() to log XIM events and help with debugging. 相关文件: src/mbyte.c Patch 6.2.329 问题: ":=" does not work Vi compatible. (Antony Scriven) 解决方案: Print the last line number instead of the current line. Don't print "line". 相关文件: src/ex_cmds.h, src/ex_docmd.c Patch 6.2.330 (extra, after 6.2.267) 问题: Win32: Crash when tearing off a menu. 解决方案: Terminate a string with a NUL. (Yasuhiro Matsumoto) 相关文件: src/gui_w32.c Patch 6.2.331 (after 6.2.327) 问题: "gwap" leaves cursor in the wrong line. 解决方案: Remember the cursor position before finding the ends of the paragraph. 相关文件: src/normal.c, src/ops.c, src/structs.h Patch 6.2.332 (extra) 问题: Amiga: Compile error for string array. Compiling the Amiga GUI doesn't work. 解决方案: Use a char pointer instead. Move including "gui_amiga.h" to after including "vim.h". Add a semicolon. (Ali Akcaagac) 相关文件: src/gui_amiga.c, src/os_amiga.c Patch 6.2.333 (extra) 问题: Win32: printing doesn't work with specified font charset. 解决方案: Use the specified font charset. (Mike Williams) 相关文件: src/os_mswin.c Patch 6.2.334 (extra, after 6.2.296) 问题: Win32: evaluating client expression in debug mode requires typing "cont". 解决方案: Use eval_client_expr_to_string(). 相关文件: src/os_mswin.c Patch 6.2.335 问题: The ":sign" command cannot be followed by another command. 解决方案: Add TRLBAR to the command flags. 相关文件: src/ex_cmds.h Patch 6.2.336 (after 6.2.327) 问题: Mixup of items in an expression. 解决方案: Move "== NUL" to the right spot. 相关文件: src/edit.c Patch 6.2.337 (extra, after 6.2.319) 问题: Building gvimext.dll with Mingw doesn't work properly. 解决方案: Fix white space and other details. (Alejandro Lopez-Valencia) 相关文件: src/GvimExt/Make_ming.mak Patch 6.2.338 (after 6.2.331) 问题: When undoing "gwap" the cursor is always put at the start of the paragraph. When undoing auto-formatting the cursor may be above the change. 解决方案: Try to move the cursor back to where it was or to the first line that actually changed. 相关文件: src/normal.c, src/ops.c, src/undo.c Patch 6.2.339 问题: Crash when using many different highlight groups and a User highlight group. (Juergen Kraemer) 解决方案: Do not use the sg_name_u pointer when it is NULL. Also simplify use of the highlight group table. 相关文件: src/syntax.c Patch 6.2.340 问题: ":reg" doesn't show the actual contents of the clipboard if it was filled outside of Vim. (Stuart MacDonald) 解决方案: Obtain the clipboard contents before displaying it. 相关文件: src/ops.c Patch 6.2.341 (extra) 问题: Win32: When the path to diff.exe contains a space and using the vimrc generated by the install program, diff mode does not work. 解决方案: Put the first double quote just before the space instead of before the path. 相关文件: src/dosinst.c Patch 6.2.342 (extra) 问题: Win32: macros are not always used as expected. 解决方案: Define WINVER to 0x0400 instead of 0x400. (Alejandro Lopez-Valencia) 相关文件: src/Make_bc5.mak, src/Make_cyg.mak, src/Make_mvc.mak Patch 6.2.343 问题: Title doesn't work with some window managers. X11: Setting the text property for the window title is hard coded. 解决方案: Use STRING format when possible. Use the UTF-8 function when it's available and 'encoding' is utf-8. Use XStringListToTextProperty(). Do the same for the icon name. (David Harrison) 相关文件: src/os_unix.c Patch 6.2.344 (extra, after 6.2.337) 问题: Cannot build gvimext.dll with MingW on Linux. 解决方案: Add support for cross compiling. (Ronald Hoellwarth) 相关文件: src/GvimExt/Make_ming.mak Patch 6.2.345 (extra) 问题: Win32: Copy/paste between two Vims fails if 'encoding' is not set properly or there are illegal bytes. 解决方案: Use a raw byte format. Always set it when copying. When pasting use the raw format if 'encoding' is the same. 相关文件: src/os_mswin.c, src/os_win16.c, src/os_win32.c, src/vim.h Patch 6.2.346 问题: Win32 console: After using "chcp" Vim does not detect the different codepage. 解决方案: Use GetConsoleCP() and when it is different from GetACP() set 'termencoding'. 相关文件: src/option.c Patch 6.2.347 (extra) 问题: Win32: XP theme support is missing. 解决方案: Add a manifest and refer to it from the resource file. (Michael Wookey) 相关文件: Makefile, src/gvim.exe.mnf, src/vim.rc Patch 6.2.348 问题: Win32: "vim c:\dir\(test)" doesn't work, because the 'isfname' default value doesn't contain parentheses. 解决方案: Temporarily add '(' and ')' to 'isfname' when expanding file name arguments. 相关文件: src/main.c Patch 6.2.349 问题: Finding a match using 'matchpairs' may cause a crash. 'matchpairs' is not used for 'showmatch'. 解决方案: Don't look past the NUL in 'matchpairs'. Use 'matchpairs' for 'showmatch'. (Dave Olszewkski) 相关文件: src/misc1.c, src/normal.c, src/proto/search.pro, src/search.c Patch 6.2.350 问题: Not enough info about startup timing. 解决方案: Add a few more TIME_MSG() calls. 相关文件: src/main.c Patch 6.2.351 问题: Win32: $HOME may be set to %USERPROFILE%. 解决方案: Expand %VAR% at the start of $HOME. 相关文件: src/misc1.c Patch 6.2.352 (after 6.2.335) 问题: ":sign texthl=||" does not work. 解决方案: Remove the check for a following command. Give an error for extra arguments after "buff=1". 相关文件: src/ex_cmds.c, src/ex_cmds.h Patch 6.2.353 (extra) 问题: Win32: Supported server name length is limited. (Paul Bossi) 解决方案: Use MAX_PATH instead of 25. 相关文件: src/os_mswin.c Patch 6.2.354 (extra) 问题: Win32: When the mouse pointer is on a tear-off menu it is hidden when typing but is not redisplayed when moved. (Markx Hackmann) 解决方案: Handle the pointer move event for the tear-off menu window. 相关文件: src/gui_w32.c Patch 6.2.355 (after 6.2.303) 问题: When 'encoding' is a double-byte encoding different from the current locale, the width of characters is not correct. Possible failure and memory leak when using iconv, Unicode digraphs and 'encoding' is not "utf-8". 解决方案: Use iconv() to discover the actual width of characters. Add the "vc_fail" field to vimconv_T. When converting a digraph, init the conversion type to NONE and cleanup afterwards. 相关文件: src/digraph.c, src/mbyte.c, src/structs.h Patch 6.2.356 问题: When using a double-byte 'encoding' and 'selection' is "exclusive", "vy" only yanks the first byte of a double-byte character. (Xiangjiang Ma) 解决方案: Correct the column in unadjust_for_sel() to position on the first byte, always include the trailing byte of the selected text. 相关文件: src/normal.c Patch 6.2.357 (after 6.2.321) 问题: Memory leak when resizing the Vim window. 解决方案: Free the LineWraps array. 相关文件: src/screen.c Patch 6.2.358 (after 6.2.299) 问题: Memory leak when using ":help" and the language doesn't match. 解决方案: Free the array with matching tags. 相关文件: src/ex_cmds.c Patch 6.2.359 (after 6.2.352) 问题: Compiler warning for long to int type cast. 解决方案: Add explicit type cast. 相关文件: src/ex_cmds.c Patch 6.2.360 问题: "100|" in an empty line results in a ruler "1,0-100". (Pavol Juhas) 解决方案: Recompute w_virtcol if the target column was not reached. 相关文件: src/misc2.c Patch 6.2.361 (extra) 问题: Win32: Run gvim, ":set go-=m", use Alt-Tab, keep Alt pressed while pressing Esc, then release Alt: Cursor disappears and typing a key causes a beep. (Hari Krishna Dara) 解决方案: Don't ignore the WM_SYSKEYUP event when the menu is disabled. 相关文件: src/gui_w32.c Patch 6.2.362 (extra, after 6.2.347) 问题: Win32: The manifest causes gvim not to work. (Dave Roberts) 解决方案: Change "x86" to "X86". (Serge Pirotte) 相关文件: src/gvim.exe.mnf Patch 6.2.363 问题: In an empty file with 'showmode' off, "i" doesn't change the ruler from "0-1" to "1". Typing "x<BS>" does show "1", but then <Esc> doesn't make it "0-1" again. Same problem for ruler in statusline. (Andrew Pimlott) 解决方案: Remember the "empty line" flag with Insert mode and'ed to it. 相关文件: src/screen.c Patch 6.2.364 问题: HTML version of the documentation doesn't mention the encoding, which is a problem for mbyte.txt. 解决方案: Adjust the awk script. (Ilya Sher) 相关文件: runtime/doc/makehtml.awk Patch 6.2.365 问题: The configure checks for Perl and Python may add compile and link arguments that break building Vim. 解决方案: Do a sanity check: try building with the arguments. 相关文件: src/auto/configure, src/configure.in Patch 6.2.366 问题: When the GUI can't start because no valid font is found, there is no error message. (Ugen) 解决方案: Add an error message. 相关文件: src/gui.c Patch 6.2.367 问题: Building the help tags file while installing may fail if there is another Vim in $PATH. 解决方案: Specify the just installed Vim executable. (Gordon Prieur) 相关文件: src/Makefile Patch 6.2.368 问题: When 'autochdir' is set, closing a window doesn't change to the directory of the new current window. (Salman Halim) 解决方案: Handle 'autochdir' always when a window becomes the current one. 相关文件: src/window.c Patch 6.2.369 问题: Various memory leaks: when using globpath(), when searching for help tags files, when defining a function inside a function, when giving an error message through an exception, for the final "." line in ":append", in expression "cond ? a : b" that fails and for missing ")" in an expression. Using NULL pointer when adding first user command and for pointer computations with regexp. (tests by Dominique Pelle) 解决方案: Fix the leaks by freeing the allocated memory. Don't use the array of user commands when there are no entries. Use a macro instead of a function call for saving and restoring regexp states. 相关文件: src/eval.c, src/ex_cmds.c, src/ex_docmd.c, src/ex_getln.c, src/misc2.c, src/regexp.c, src/screen.c, src/tag.c Patch 6.2.370 (extra, after6.2.341) 问题: Win32: When the path to diff.exe contains a space and using the vimrc generated by the install program, diff mode may not work. (Alejandro Lopez-Valencia) 解决方案: Do not use double quotes for arguments that do not have a space. 相关文件: src/dosinst.c Patch 6.2.371 问题: When 'virtualedit' is set and there is a Tab before the next "x", "dtx" does not delete the whole Tab. (Ken Hashishi) 解决方案: Move the cursor to the last position of the Tab. Also for "df<Tab>". 相关文件: src/normal.c Patch 6.2.372 问题: When using balloon evaluation, no value is displayed for members of structures and items of an array. 解决方案: Include "->", "." and "[*]" in the expression. 相关文件: src/gui_beval.c, src/normal.c, src/vim.h Patch 6.2.373 问题: When 'winminheight' is zero and a window is reduced to zero height, the ruler always says "Top" instead of the cursor position. (Antoine J. Mechelynck) 解决方案: Don't recompute w_topline for a zero-height window. 相关文件: src/window.c Patch 6.2.374 问题: ":echo "hello" | silent normal n" removes the "hello" message. (Servatius Brandt) 解决方案: Don't echo the search string when ":silent" was used. Also don't show the mode. In general: don't clear to the end of the screen. 相关文件: src/gui.c, src/message.c, src/os_unix.c, src/proto/message.pro, src/screen.c, src/search.c, src/window.c Patch 6.2.375 问题: When changing 'guioptions' the hit-enter prompt may be below the end of the Vim window. 解决方案: Call screen_alloc() before showing the prompt. 相关文件: src/message.c Patch 6.2.376 问题: Win32: Ruby interface cannot be dynamically linked with Ruby 1.6. 解决方案: Add #ifdefs around use of rb_w32_snprintf(). (Benoît Cerrina) 相关文件: src/if_ruby.c Patch 6.2.377 (after 6.2.372) 问题: Compiler warnings for signed/unsigned compare. (Michael Wookey) 解决方案: Add type cast. 相关文件: src/normal.c Patch 6.2.378 (extra, after 6.2.118) 问题: Mac: cannot build with Project Builder. 解决方案: Add remove_tail_with_ext() to locate and remove the "build" directory from the runtime path. Include os_unix.c when needed. (Dany St Amant) 相关文件: src/misc1.c, src/os_macosx.c, src/vim.h Patch 6.2.379 问题: Using ":mkvimrc" in the ":options" window sets 'bufhidden' to "delete". (Michael Naumann) 解决方案: Do not add buffer-specific option values to a global vimrc file. 相关文件: src/option.c Patch 6.2.380 (extra) 问题: DOS: "make test" fails when running it again. Can't "make test" with Borland C. 解决方案: Make sure ".out" files are deleted when they get in the way. Add a "test" target to the Borland C Makefile. 相关文件: src/Make_bc5.mak, src/testdir/Make_dos.mak Patch 6.2.381 问题: Setting 'fileencoding' to a comma-separated list (confusing it with 'fileencodings') does not result in an error message. Setting 'fileencoding' in an empty file marks it as modified. There is no "+" in the title after setting 'fileencoding'. 解决方案: Check for a comma in 'fileencoding'. Only consider a non-empty file modified by changing 'fileencoding'. Update the title after changing 'fileencoding'. 相关文件: src/option.c Patch 6.2.382 问题: Running "make test" puts marks from test files in viminfo. 解决方案: Specify a different viminfo file to use. 相关文件: src/testdir/test15.in, src/testdir/test49.in Patch 6.2.383 问题: ":hi foo term='bla" crashes Vim. (Antony Scriven) 解决方案: Check that the closing ' is there. 相关文件: src/syntax.c Patch 6.2.384 问题: ":menu a.&b" ":unmenu a.b" only works if "&b" isn't translated. 解决方案: Also compare the names without '&' characters. 相关文件: src/menu.c Patch 6.2.385 (extra) 问题: Win32: forward_slash() and trash_input_buf() are undefined when compiling with small features. (Ajit Thakkar) 解决方案: Change the #ifdefs for forward_slash(). Don't call trash_input_buf() if the input buffer isn't used. 相关文件: src/fileio.c, src/os_win32.c Patch 6.2.386 问题: Wasting time trying to read marks from the viminfo file for a buffer without a name. 解决方案: Skip reading marks when the buffer has no name. 相关文件: src/fileio.c Patch 6.2.387 问题: There is no highlighting of translated items in help files. 解决方案: Search for a "help_ab.vim" syntax file when the help file is called "*.abx". Also improve the help highlighting a bit. 相关文件: runtime/syntax/help.vim Patch 6.2.388 问题: GTK: When displaying some double-width characters they are drawn as single-width, because of conversion to UTF-8. 解决方案: Check the width that GTK uses and add a space if it's one instead of two. 相关文件: src/gui_gtk_x11.c Patch 6.2.389 问题: When working over a slow connection, it's very annoying that the last line is partly drawn and then cleared for every change. 解决方案: Don't redraw the bottom line if no rows were inserted or deleted. Don't draw the line if we know "@" lines will be used. 相关文件: src/screen.c Patch 6.2.390 问题: Using "r*" in Visual mode on multibyte characters only replaces every other character. (Tyson Roberts) 解决方案: Correct the cursor position after replacing each character. 相关文件: src/ops.c Patch 6.2.391 (extra) 问题: The ":highlight" command is not tested. 解决方案: Add a test script for ":highlight". 相关文件: src/testdir/Makefile, src/testdir/Make_amiga.mak, src/testdir/Make_dos.mak, src/testdir/Make_os2.mak, src/testdir/Make_vms.mms, src/testdir/test51.in, src/testdir/test51.ok Patch 6.2.392 (after 6.2.384) 问题: Unused variable. 解决方案: Remove "dlen". 相关文件: src/menu.c Patch 6.2.393 问题: When using very long lines the viminfo file can become very big. 解决方案: Add the "s" flag to 'viminfo': skip registers with more than the specified Kbyte of text. 相关文件: runtime/doc/options.txt, src/ops.c, src/option.c Patch 6.2.394 (after 6.2.391) 问题: Test 51 fails on a terminal with 8 colors. (Tony Leneis) 解决方案: Use "DarkBlue" instead of "Blue" to avoid the "bold" attribute. 相关文件: src/testdir/test51.in Patch 6.2.395 问题: When using ":tag" or ":pop" the previous matching tag is used. But since the current file is different, the ordering of the tags may change. 解决方案: Remember what the current buffer was for when re-using cur_match. 相关文件: src/edit.c, src/ex_cmds.c, src/proto/tag.pro, src/structs.h, src/tag.c Patch 6.2.396 问题: When CTRL-T jumps to another file and an autocommand moves the cursor to the '" mark, don't end up on the right line. (Michal Malecki) 解决方案: Set the line number after loading the file. 相关文件: src/tag.c Patch 6.2.397 问题: When using a double-byte 'encoding' mapping <M-x> doesn't work. (Yasuhiro Matsumoto) 解决方案: Do not set the 8th bit of the character but use a modifier. 相关文件: src/gui_gtk_x11.c, src/gui_x11.c, src/misc2.c Patch 6.2.398 (extra) 问题: Win32 console: no extra key modifiers are supported. 解决方案: Encode the modifiers into the input stream. Also fix that special keys are converted and stop working when 'tenc' is set. Also fix that when 'tenc' is initialized the input and output conversion is not setup properly until 'enc' or 'tenc' is set. 相关文件: src/getchar.c, src/option.c, src/os_win32.c Patch 6.2.399 问题: A ":set" command that fails still writes a message when it is inside a try/catch block. 解决方案: Include all the text of the message in the error message. 相关文件: src/charset.c, src/option.c Patch 6.2.400 问题: Can't compile if_xcmdsrv.c on HP-UX 11.0. 解决方案: Include header file poll.h. (Malte Neumann) 相关文件: src/if_xcmdsrv.c Patch 6.2.401 问题: When opening a buffer that was previously opened, Vim does not restore the cursor position if the first line starts with white space. (Gregory Margo) 解决方案: Don't skip restoring the cursor position if it is past the blanks in the first line. 相关文件: src/buffer.c Patch 6.2.402 问题: Mac: "make install" doesn't generate help tags. (Benji Fisher) 解决方案: Generate help tags before copying the runtime files. 相关文件: src/Makefile Patch 6.2.403 问题: ":@y" checks stdin if there are more commands to execute. This fails if stdin is not connected, e.g., when starting the GUI from KDE. (Ned Konz) 解决方案: Only check for a next command if there still is typeahead. 相关文件: src/ex_docmd.c Patch 6.2.404 问题: Our own function to determine width of Unicode characters may get outdated. (Markus Kuhn) 解决方案: Use wcwidth() when it is available. Also use iswprint(). 相关文件: src/auto/configure, src/configure.in, src/config.h.in, src/mbyte.c Patch 6.2.405 问题: Cannot map zero without breaking the count before a command. (Benji Fisher) 解决方案: Disable mapping zero when entering a count. 相关文件: src/getchar.c, src/globals.h, src/normal.c Patch 6.2.406 问题: ":help \zs", ":help \@=" and similar don't find useful help. 解决方案: Prepend "/\" to the arguments to find the desired help tag. 相关文件: src/ex_cmds.c Patch 6.2.407 (after 6.2.299) 问题: ":help \@<=" doesn't find help. 解决方案: Avoid that ":help \@<=" searches for the "<=" language. 相关文件: src/tag.c Patch 6.2.408 问题: ":compiler" is not consistent: Sets local options and a global variable. (Douglas Potts) There is no error message when a compiler is not supported. 解决方案: Use ":compiler!" to set a compiler globally, otherwise it's local to the buffer and "b:current_compiler" is used. Give an error when no compiler script could be found. Note: updated compiler plugins can be found at ftp://ftp.vim.org/pub/vim/runtime/compiler/ 相关文件: runtime/compiler/msvc.vim, runtime/doc/quickfix.txt, src/eval.c, src/ex_cmds2.c Patch 6.2.409 问题: The cursor ends up in the last column instead of after the line when doing "i//<Esc>o" with 'indentexpr' set to "cindent(v:lnum)". (Toby Allsopp) 解决方案: Adjust the cursor as if in Insert mode. 相关文件: src/misc1.c Patch 6.2.410 (after 6.2.389) 问题: In diff mode, when there are more filler lines than fit in the window, they are not drawn. 解决方案: Check for filler lines when skipping to draw a line that doesn't fit. 相关文件: src/screen.c Patch 6.2.411 问题: A "\n" inside a string is not seen as a line break by the regular expression matching. (Hari Krishna Dara) 解决方案: Add the vim_regexec_nl() function for strings where "\n" is to be matched with a line break. 相关文件: src/eval.c, src/ex_eval.c, src/proto/regexp.c, src/regexp.c Patch 6.2.412 问题: Ruby: "ruby << EOF" inside a function doesn't always work. Also for ":python", ":tcl" and ":perl". 解决方案: Check for "<< marker" and skip until "marker" before checking for "endfunction". 相关文件: src/eval.c Patch 6.2.413 (after 6.2.411) 问题: Missing prototype for vim_regexec_nl(). (Marcel Svitalsky) 解决方案: Now really include the prototype. 相关文件: src/proto/regexp.pro Patch 6.2.414 问题: The function used for custom completion of user commands cannot have <SID> to make it local. (Hari Krishna Dara) 解决方案: Pass the SID of the script where the user command was defined on to the completion. Also clean up #ifdefs. 相关文件: src/ex_docmd.c, src/eval.c, src/ex_getln.c, src/structs.h Patch 6.2.415 问题: Vim may crash after a sequence of events that change the window size. The window layout assumes a larger window than is actually available. (Servatius Brandt) 解决方案: Invoke win_new_shellsize() from screenalloc() instead of from set_shellsize(). 相关文件: src/screen.c, src/term.c Patch 6.2.416 问题: Compiler warning for incompatible pointer. 解决方案: Remove the "&" in the call to poll(). (Xavier de Gaye) 相关文件: src/os_unix.c Patch 6.2.417 (after 6.2.393) 问题: Many people forget that the '"' item in 'viminfo' needs to be preceded with a backslash, 解决方案: Add '<' as an alias for the '"' item. 相关文件: runtime/doc/options.txt, src/ops.c, src/option.c Patch 6.2.418 问题: Using ":nnoremap <F12> :echo "cheese" and ":cabbr cheese xxx": when pressing <F12> still uses the abbreviation. (Hari Krishna) 解决方案: Also apply "noremap" to abbreviations. 相关文件: src/getchar.c Patch 6.2.419 (extra) 问题: Win32: Cannot open the Vim window inside another application. 解决方案: Add the "-P" argument to specify the window title of the application to run inside. (Zibo Zhao) 相关文件: runtime/doc/starting.txt, src/main.c, src/gui_w32.c, src/gui_w48.c, src/if_ole.cpp, src/os_mswin.c, src/proto/gui_w32.pro Patch 6.2.420 问题: Cannot specify a file to be edited in binary mode without setting the global value of the 'binary' option. 解决方案: Support ":edit ++bin file". 相关文件: runtime/doc/editing.txt, src/buffer.c, src/eval.c, src/ex_cmds.h, src/ex_docmd.c, src/fileio.c, src/misc2.c Patch 6.2.421 问题: Cannot set the '[ and '] mark, which may be necessary when an autocommand simulates reading a file. 解决方案: Allow using "m[" and "m]". 相关文件: runtime/doc/motion.txt, src/mark.c Patch 6.2.422 问题: In CTRL-X completion messages the "/" makes them less readable. 解决方案: Remove the slashes. (Antony Scriven) 相关文件: src/edit.c Patch 6.2.423 问题: ":vertical wincmd ]" does not split vertically. 解决方案: Add "postponed_split_flags". 相关文件: src/ex_docmd.c, src/globals.h, src/if_cscope.c, src/tag.c Patch 6.2.424 问题: A BufEnter autocommand that sets an option stops 'mousefocus' from working in Insert mode (Normal mode is OK). (Gregory Seidman) 解决方案: In the Insert mode loop invoke gui_mouse_correct() when needed. 相关文件: src/edit.c Patch 6.2.425 问题: Vertical split and command line window: can only drag status line above the cmdline window on the righthand side, not lefthand side. 解决方案: Check the status line row instead of the window pointer. 相关文件: src/ui.c Patch 6.2.426 问题: A syntax region end match with a matchgroup that includes a line break only highlights the last line with matchgroup. (Gary Holloway) 解决方案: Also use the line number of the position where the region highlighting ends. 相关文件: src/syntax.c Patch 6.2.427 (extra) 问题: When pasting a lot of text in a multibyte encoding, conversion from 'termencoding' to 'encoding' may fail for some characters. (Kuang-che Wu) 解决方案: When there is an incomplete byte sequence at the end of the read text keep it for the next time. 相关文件: src/mbyte.c, src/os_amiga.c, src/os_mswin.c, src/proto/mbyte.pro, src/proto/os_mswin.pro, src/ui.c Patch 6.2.428 问题: The X11 clipboard supports the Vim selection for char/line/block mode, but since the encoding is not included can't copy/paste between two Vims with a different 'encoding'. 解决方案: Add a new selection format that includes the 'encoding'. Perform conversion when necessary. 相关文件: src/gui_gtk_x11.c, src/ui.c, src/vim.h Patch 6.2.429 问题: Unix: glob() doesn't work for a directory with a single quote in the name. (Nazri Ramliy) 解决方案: When using the shell to expand, only put double quotes around spaces and single quotes, not the whole thing. 相关文件: src/os_unix.c Patch 6.2.430 问题: BOM at start of a vim script file is not recognized and causes an error message. 解决方案: Detect the BOM and skip over it. Also fix that after using ":scriptencoding" the iconv() file descriptor was not closed (memory leak). 相关文件: src/ex_cmds2.c Patch 6.2.431 问题: When using the horizontal scrollbar, the scrolling is limited to the length of the cursor line. 解决方案: Make the scroll limit depend on the longest visible line. The cursor is moved when necessary. Including the 'h' flag in 'guioptions' disables this. 相关文件: runtime/doc/gui.txt, runtime/doc/options.txt, src/gui.c, src/misc2.c, src/option.h Patch 6.2.432 (after 6.2.430 and 6.2.431) 问题: Lint warnings. 解决方案: Add type casts. 相关文件: src/ex_cmds2.c, src/gui.c Patch 6.2.433 问题: Translating "VISUAL" and "BLOCK" separately doesn't give a good result. (Alejandro Lopez Valencia) 解决方案: Use a string for each combination. 相关文件: src/screen.c Patch 6.2.434 (after 6.2.431) 问题: Compiler warning. (Salman Halim) 解决方案: Add type casts. 相关文件: src/gui.c Patch 6.2.435 问题: When there are vertically split windows the minimal Vim window height is computed wrong. 解决方案: Use frame_minheight() to correctly compute the minimal height. 相关文件: src/window.c Patch 6.2.436 问题: Running the tests changes the user's viminfo file. 解决方案: In test 49 tell the extra Vim to use the test viminfo file. 相关文件: src/testdir/test49.vim Patch 6.2.437 问题: ":mksession" always puts "set nocompatible" in the session file. This changes option settings. (Ron Aaron) 解决方案: Add an "if" to only change 'compatible' when needed. 相关文件: src/ex_docmd.c Patch 6.2.438 问题: When the 'v' flag is present in 'cpoptions', backspacing and then typing text again: one character too much is overtyped before inserting is done again. 解决方案: Set "dollar_vcol" to the right column. 相关文件: src/edit.c Patch 6.2.439 问题: GTK 2: Changing 'lines' may cause a mismatch between the window layout and the size of the window. 解决方案: Disable the hack with force_shell_resize_idle(). 相关文件: src/gui_gtk_x11.c Patch 6.2.440 问题: When 'lazyredraw' is set the window title is still updated. The size of the Visual area and the ruler are displayed too often. 解决方案: Postpone redrawing the window title. Only show the Visual area size when waiting for a character. Don't draw the ruler unnecessary. 相关文件: src/buffer.c, src/normal.c, src/screen.c Patch 6.2.441 问题: ":unabbreviate foo " doesn't work, because of the trailing space, while an abbreviation with a trailing space is not possible. (Paul Jolly) 解决方案: Accept a match with the lhs of an abbreviation without the trailing space. 相关文件: src/getchar.c Patch 6.2.442 问题: Cannot manipulate the command line from a function. 解决方案: Add getcmdline(), getcmdpos() and setcmdpos() functions and the CTRL-\ e command. 相关文件: runtime/doc/cmdline.txt, runtime/doc/eval.txt, src/eval.c src/ex_getln.c, src/ops.c, src/proto/ex_getln.pro, src/proto/ops.pro Patch 6.2.443 问题: With ":silent! echoerr something" you don't get the position of the error. emsg() only writes the message itself and returns. 解决方案: Also redirect the position of the error. 相关文件: src/message.c Patch 6.2.444 问题: When adding the 'c' flag to a ":substitute" command it may replace more times than without the 'c' flag. Happens for a match that starts with "\ze" (Marcel Svitalsky) and when using "\@<=" (Klaus Bosau). 解决方案: Correct "prev_matchcol" when replacing the line. Don't replace the line when the pattern uses look-behind matching. 相关文件: src/ex_cmds.c, src/proto/regexp.pro, src/regexp.c Patch 6.2.445 问题: Copying vimtutor to /tmp/something is not secure, a symlink may cause trouble. 解决方案: Create a directory and create the file in it. Use "umask" to create the directory with mode 700. (Stefan Nordhausen) 相关文件: src/vimtutor Patch 6.2.446 (after 6.2.404) 问题: Using library functions wcwidth() and iswprint() results in display problems for Hebrew characters. (Ron Aaron) 解决方案: Disable the code to use the library functions, use our own. 相关文件: src/mbyte.c Patch 6.2.447 (after 6.2.440) 问题: Now that the title is only updated when redrawing, it is no longer possible to show it while executing a function. (Madoka Machitani) 解决方案: Make ":redraw" also update the title. 相关文件: src/ex_docmd.c Patch 6.2.448 (after 6.2.427) 问题: Mac: conversion done when 'termencoding' differs from 'encoding' fails when pasting a longer text. 解决方案: Check for an incomplete sequence at the end of the chunk to be converted. (Eckehard Berns) 相关文件: src/mbyte.c Patch 6.2.449 (after 6.2.431) 问题: Get error messages when switching files. 解决方案: Check for a valid line number when calculating the width of the horizontal scrollbar. (Helmut Stiegler) 相关文件: src/gui.c Patch 6.2.450 问题: " #include" and " #define" are not recognized with the default option values for 'include' and 'defined'. (RG Kiran) 解决方案: Adjust the default values to allow white space before the #. 相关文件: runtime/doc/options.txt, src/option.c Patch 6.2.451 问题: GTK: when using XIM there are various problems, including setting 'modified' and breaking undo at the wrong moment. 解决方案: Add "xim_changed_while_preediting", "preedit_end_col" and im_is_preediting(). (Yasuhiro Matsumoto) 相关文件: src/ex_getln.c, src/globals.h, src/gui_gtk.c, src/gui_gtk_x11.c, src/mbyte.c, src/misc1.c, src/proto/mbyte.pro, src/screen.c, src/undo.c Patch 6.2.452 问题: In diff mode, when DiffAdd and DiffText highlight settings are equal, an added line is highlighted with DiffChange. (Tom Schumm) 解决方案: Remember the diff highlight type instead of the attributes. 相关文件: src/screen.c Patch 6.2.453 问题: ":s/foo\|\nbar/x/g" does not replace two times in "foo\nbar". (Pavel Papushev) 解决方案: When the pattern can match a line break also try matching at the NUL at the end of a line. 相关文件: src/ex_cmds.c, src/regexp.c Patch 6.2.454 问题: ":let b:changedtick" doesn't work. (Alan Schmitt) ":let b:changedtick = 99" does not give an error message. 解决方案: Add code to recognize ":let b:changedtick". 相关文件: src/eval.c Patch 6.2.455 (after 6.2.297) 问题: In Python commands the current locale changes how certain Python functions work. (Eugene M. Minkovskii) 解决方案: Set the LC_NUMERIC locale to "C" while executing a Python command. 相关文件: src/if_python.c Patch 6.2.456 (extra) 问题: Win32: Editing a file by its Unicode name (dropping it on Vim or using the file selection dialog) doesn't work. (Yakov Lerner, Alex Jakushev) 解决方案: Use wide character functions when file names are involved and convert from/to 'encoding' where needed. 相关文件: src/gui_w48.c, src/macros.h, src/memfile.c, src/memline.c, src/os_mswin.c, src/os_win32.c Patch 6.2.457 (after 6.2.244) 问题: When 'encoding' is "utf-8" and writing text with chars above 0x80 in latin1, conversion is wrong every 8200 bytes. (Oyvind Holm) 解决方案: Correct the utf_ptr2len_check_len() function and fix the problem of displaying 0xf7 in utfc_ptr2len_check_len(). 相关文件: src/mbyte.c Patch 6.2.458 问题: When 'virtualedit' is set "$" doesn't move to the end of an unprintable character, causing "y$" not to include that character. (Fred Ma) 解决方案: Set "coladd" to move the cursor to the end of the character. 相关文件: src/misc2.c Patch 6.2.459 (after 6.2.454) 问题: Variable "b" cannot be written. (Salman Halim) 解决方案: Compare strings properly. 相关文件: src/eval.c Patch 6.2.460 (extra, after 6.2.456) 问题: Compiler warnings for missing prototypes. 解决方案: Include the missing prototypes. 相关文件: src/proto/os_win32.pro Patch 6.2.461 问题: After using a search command "x" starts putting single characters in the numbered registers. 解决方案: Reset "use_reg_one" at the right moment. 相关文件: src/normal.c Patch 6.2.462 问题: Finding a matching parenthesis does not correctly handle a backslash in a trailing byte. 解决方案: Handle multibyte characters correctly. (Taro Muraoka) 相关文件: src/search.c Patch 6.2.463 (extra) 问题: Win32: An NTFS file system may contain files with extra info streams. The current method to copy them creates one and then deletes it again. (Peter Toennies) Also, only three streams with hard coded names are copied. 解决方案: Use BackupRead() to check which info streams the original file contains and only copy these streams. 相关文件: src/os_win32.c Patch 6.2.464 (extra, after 6.2.427) 问题: Amiga: Compilation error with gcc. (Ali Akcaagac) 解决方案: Move the #ifdef outside of Read(). 相关文件: src/os_amiga.c Patch 6.2.465 问题: When resizing the GUI window the window manager sometimes moves it left of or above the screen. (Michael McCarty) 解决方案: Check the window position after resizing it and move it onto the screen when it isn't. 相关文件: src/gui.c Patch 6.2.466 (extra, after 6.2.456) 问题: Win32: Compiling with Borland C fails, and an un/signed warning. 解决方案: Redefine wcsicmp() to wcscmpi() and add type casts. (Yasuhiro Matsumoto) 相关文件: src/os_win32.c Patch 6.2.467 (extra, after 6.2.463) 问题: Win32: can't compile without multibyte feature. (Ajit Thakkar) 解决方案: Add #ifdefs around the info stream code. 相关文件: src/os_win32.c Patch 6.2.468 问题: Compiler warnings for shadowed variables. (Matthias Mohr) 解决方案: Delete superfluous variables and rename others. 相关文件: src/eval.c, src/ex_docmd.c, src/ex_eval.c, src/if_cscope.c, src/fold.c, src/option.c, src/os_unix.c, src/quickfix.c, src/regexp.c Patch 6.2.469 (extra, after 6.2.456) 问题: Win32: Can't create swap file when 'encoding' differs from the active code page. (Kriton Kyrimis) 解决方案: In enc_to_ucs2() terminate the converted string with a NUL 相关文件: src/os_mswin.c Patch 6.2.470 问题: The name returned by tempname() may be equal to the file used for shell output when ignoring case. 解决方案: Skip 'O' and 'I' in tempname(). 相关文件: src/eval.c Patch 6.2.471 问题: "-L/usr/lib" is used in the link command, even though it's supposed to be filtered out. "-lw" and "-ldl" are not automatically added when needed for "-lXmu". (Antonio Colombo) 解决方案: Check for a space after the argument instead of before. Also remove "-R/usr/lib" if it's there. Check for "-lw" and "-ldl" before trying "-lXmu". 相关文件: src/auto/configure, src/configure.in, src/link.sh Patch 6.2.472 问题: When using a FileChangedShell autocommand that changes the current buffer, a buffer exists that can't be wiped out. Also, Vim sometimes crashes when executing an external command that changes the buffer and a FileChangedShell autocommand is used. (Hari Krishna Dara) Users are confused by the warning for a file being changed outside of Vim. 解决方案: Avoid that the window counter for a buffer is incremented twice. Avoid that buf_check_timestamp() is used recursively. Add a hint to look in the help for more info. 相关文件: src/ex_cmds.c, src/fileio.c Patch 6.2.473 问题: Using CTRL-] in a help buffer without a name causes a crash. 解决方案: Check for name to be present before using it. (Taro Muraoka) 相关文件: src/tag.c Patch 6.2.474 (extra, after 6.2.456) 问题: When Vim is starting up conversion is done unnecessarily. Failure to find the runtime files on Windows 98. (Randall W. Morris) 解决方案: Init enc_codepage negative, only use it when not negative. Don't use GetFileAttributesW() on Windows 98 or earlier. 相关文件: src/globals.h, src/gui_w32.c, src/gui_w48.c, src/os_mswin.c, src/os_win32.c Patch 6.2.475 问题: Commands after "perl <<EOF" are parsed as Vim commands when they are not executed. 解决方案: Properly skip over the perl commands. 相关文件: src/ex_docmd.c, src/ex_getln.c, src/if_perl.xs, src/if_python.c, src/if_ruby.c, src/if_tcl.c, src/misc2.c Patch 6.2.476 问题: When reloading a hidden buffer changed outside of Vim and the current buffer is read-only, the reloaded buffer becomes read-only. (Hari Krishna Dara) 解决方案: Save the 'readonly' flag of the reloaded buffer instead of the current buffer. 相关文件: src/fileio.c Patch 6.2.477 问题: Using remote_send(v:servername, "\<C-V>") causes Vim to hang. (Yakov Lerner) 解决方案: When the resulting string is empty don't set received_from_client. 相关文件: src/main.c Patch 6.2.478 问题: Win32: "--remote file" fails changing directory if the current directory name starts with a single quote. (Iestyn Walters) 解决方案: Add a backslash where it will be removed later. 相关文件: src/main.c, src/misc2.c, src/proto/misc2.pro Patch 6.2.479 问题: The error message for errors during recovery goes unnoticed. 解决方案: Avoid that the hit-enter prompt overwrites the message. Add a few lines to make the error stand out. 相关文件: src/main.c, src/message.c, src/memline.c Patch 6.2.480 问题: NetBeans: Using negative index in array. backslash at end of message may cause Vim to crash. (Xavier de Gaye) 解决方案: Initialize buf_list_used to zero. Check for trailing backslash. 相关文件: src/netbeans.c Patch 6.2.481 问题: When writing a file it is not possible to specify that hard and/or symlinks are to be broken instead of preserved. 解决方案: Add the "breaksymlink" and "breakhardlink" values to 'backupcopy'. (Simon Ekstrand) 相关文件: runtime/doc/options.txt, src/fileio.c, src/option.c, src/option.h Patch 6.2.482 问题: Repeating insert of CTRL-K 1 S doesn't work. The superscript 1 is considered to be a digit. (Juergen Kraemer) 解决方案: In vim_isdigit() only accept '0' to '9'. Use VIM_ISDIGIT() for speed where possible. Also add vim_isxdigit(). 相关文件: src/buffer.c, src/charset.c, src/diff.c, src/digraph.c, src/edit.c, src/eval.c,, src/ex_cmds.c, src/ex_cmds2.c, src/ex_docmd.c, src/ex_eval.c, src/ex_getln.c, src/if_xcmdsrv.c, src/farsi.c, src/fileio.c, src/fold.c, src/getchar.c, src/gui.c, src/if_cscope.c, src/macros.h, src/main.c, src/mark.c, src/mbyte.c, src/menu.c, src/misc1.c, src/misc2.c, src/normal.c, src/ops.c, src/option.c, src/proto/charset.pro, src/regexp.c, src/screen.c, src/search.c, src/syntax.c, src/tag.c, src/term.c, src/termlib.c Patch 6.2.483 (extra, after 6.2.482) 问题: See 6.2.482. 解决方案: Extra part of patch 6.2.482. 相关文件: src/gui_photon.c, src/gui_w48.c, src/os_msdos.c, src/os_mswin.c Patch 6.2.484 问题: MS-Windows: With the included diff.exe, differences after a CTRL-Z are not recognized. (Peter Keresztes) 解决方案: Write the files with unix fileformat and invoke diff with --binary if possible. 相关文件: src/diff.c Patch 6.2.485 问题: A BufWriteCmd autocommand cannot know if "!" was used or not. (Hari Krishna Dara) 解决方案: Add the v:cmdbang variable. 相关文件: runtime/doc/eval.txt, src/eval.c, src/proto/eval.pro, src/fileio.c, src/vim.h Patch 6.2.486 (6.2.482) 问题: Diff for eval.c is missing. 解决方案: Addition to patch 6.2.482. 相关文件: src/eval.c Patch 6.2.487 (extra, after 6.2.456) 问题: Compiler warnings for wrong prototype. (Alejandro Lopez Valencia) 解决方案: Delete the prototype for Handle_WM_Notify(). 相关文件: src/proto/gui_w32.pro Patch 6.2.488 问题: Missing ")" in *.ch filetype detection. 解决方案: Add the ")". (Ciaran McCreesh) 相关文件: runtime/filetype.vim Patch 6.2.489 问题: When accidentally opening a session in Vim which has already been opened in another Vim there is a long row of ATTENTION prompts. Need to quit each of them to get out. (Robert Webb) 解决方案: Add the "Abort" alternative to the dialog. 相关文件: src/memline.c Patch 6.2.490 问题: With 'paragraph' it is not possible to use a single dot as a paragraph boundary. (Dorai Sitaram) 解决方案: Allow using " " (two spaces) in 'paragraph' to match ".$" or ". $" 相关文件: src/search.c Patch 6.2.491 问题: Decrementing a position doesn't take care of multibyte chars. 解决方案: Adjust the column for multibyte characters. Remove mb_dec(). (Yasuhiro Matsumoto) 相关文件: src/mbyte.c, src/misc2.c, src/proto/mbyte.pro Patch 6.2.492 问题: When using ":redraw" while there is a message, the next ":echo" still causes text to scroll. (Yasuhiro Matsumoto) 解决方案: Reset msg_didout and msg_col, so that after ":redraw" the next message overwrites an existing one. 相关文件: src/ex_docmd.c Patch 6.2.493 问题: "@x" doesn't work when 'insertmode' is set. (Benji Fisher) 解决方案: Put "restart_edit" in the typeahead buffer, so that it's used after executing the register contents. 相关文件: src/ops.c Patch 6.2.494 问题: Using diff mode with two windows, when moving horizontally in inserted lines, a fold in the other window may open. 解决方案: Compute the line number in the other window correctly. 相关文件: src/diff.c Patch 6.2.495 (extra, after 6.2.456) 问题: Win32: The file dialog doesn't work on Windows 95. 解决方案: Put the wide code of gui_mch_browse() in gui_mch_browseW() and use it only on Windows NT/2000/XP. 相关文件: src/gui_w32.c, src/gui_w48.c Patch 6.2.496 问题: FreeBSD 4.x: When compiled with the pthread library (Python) a complicated pattern may cause Vim to crash. Catching the signal doesn't work. 解决方案: When compiled with threads, instead of using the normal stacksize limit, use the size of the initial stack. 相关文件: src/auto/configure, src/config.h.in, src/configure.in, src/os_unix.c Patch 6.2.497 (extra) 问题: Russian messages are only available in one encoding. 解决方案: Convert the messages to MS-Windows codepages. (Vassily Ragosin) 相关文件: src/po/Makefile Patch 6.2.498 问题: Non-latin1 help files are not properly supported. 解决方案: Support utf-8 help files and convert them to 'encoding' when needed. 相关文件: src/fileio.c Patch 6.2.499 问题: When writing a file and halting the system, the file might be lost when using a journaling file system. 解决方案: Use fsync() to flush the file data to disk after writing a file. (Radim Kolar) 相关文件: src/fileio.c Patch 6.2.500 (extra) 问题: The DOS/MS-Windows the installer doesn't use the --binary flag for diff. 解决方案: Add --binary to the diff argument in MyDiff(). (Alejandro Lopez- Valencia) 相关文件: src/dosinst.c Patch 6.2.501 问题: Vim does not compile with MorphOS. 解决方案: Add a Makefile and a few changes to make Vim work with MorphOS. (Ali Akcaagac) 相关文件: runtime/doc/os_amiga.txt, src/INSTALLami.txt, src/Make_morphos.mak, src/memfile.c, src/term.c Patch 6.2.502 问题: Building fails for generating message files. 解决方案: Add dummy message files. 相关文件: src/po/ca.po, src/po/ru.po, src/po/sv.po Patch 6.2.503 问题: Mac: Can't compile MacRoman conversions without the GUI. 解决方案: Also link with the Carbon framework for the terminal version, for the MacRoman conversion functions. (Eckehard Berns) Remove -ltermcap from the GUI link command, it is not needed. 相关文件: src/auto/configure, src/Makefile, src/configure.in Patch 6.2.504 问题: Various problems with 'cindent', among which that a list of variable declarations is not indented properly. 解决方案: Fix the wrong indenting. Improve indenting of C++ methods. Add the 'i', 'b' and 'W' options to 'cinoptions'. (mostly by Helmut Stiegler) Improve indenting of preprocessor-continuation lines. 相关文件: runtime/doc/indent.txt, src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok Patch 6.2.505 问题: Help for -P argument is missing. (Ronald Hoellwarth) 解决方案: Add the patch that was missing in 6.2.419. 相关文件: runtime/doc/starting.txt Patch 6.2.506 (extra) 问题: Win32: When 'encoding' is a codepage then reading a utf-8 file only works when iconv is available. Writing a file in another codepage uses the wrong kind of conversion. 解决方案: Use internal conversion functions. Enable reading and writing files with 'fileencoding' different from 'encoding' for all valid codepages and utf-8 without the need for iconv. 相关文件: src/fileio.c, src/testdir/Make_dos.mak, src/testdir/test52.in, src/testdir/test52.ok Patch 6.2.507 问题: The ownership of the file with the password for the NetBeans connection is not checked. "-nb={file}" doesn't work for GTK. 解决方案: Only accept the file when owned by the user and not accessible by others. Detect "-nb=" for GTK. 相关文件: src/netbeans.c, src/gui_gtk_x11.c Patch 6.2.508 问题: Win32: "v:lang" does not show the current language for messages if it differs from the other locale settings. 解决方案: Use the value of the $LC_MESSAGES environment variable. 相关文件: src/ex_cmds2.c Patch 6.2.509 (after 6.2.508) 问题: Crash when $LANG is not set. 解决方案: Add check for NULL pointer. (Ron Aaron) 相关文件: src/ex_cmds2.c Patch 6.2.510 (after 6.2.507) 问题: Warning for pointer conversion. 解决方案: Add a type cast. 相关文件: src/gui_gtk_x11.c Patch 6.2.511 问题: Tags in Russian help files are in utf-8 encoding, which may be different from 'encoding'. 解决方案: Use the "TAG_FILE_ENCODING" field in the tags file to specify the encoding of the tags. Convert help tags from 'encoding' to the tag file encoding when searching for matches, do the reverse when listing help tags. 相关文件: runtime/doc/tagsrch.txt, src/ex_cmds.c, src/tag.c Patch 6.2.512 问题: Translating "\"\n" is useless. (Gerfried Fuchs) 解决方案: Remove the _() around it. 相关文件: src/main.c, src/memline.c Patch 6.2.513 (after 6.2.507) 问题: NetBeans: the check for owning the connection info file can be simplified. (Nikolay Molchanov) 解决方案: Only check if the access mode is right. 相关文件: src/netbeans.c Patch 6.2.514 问题: When a highlight/syntax group name contains invalid characters there is no warning. 解决方案: Add an error for unprintable characters and a warning for other invalid characters. 相关文件: src/syntax.c Patch 6.2.515 问题: When using the options window 'swapfile' is reset. 解决方案: Use ":setlocal" instead of ":set". 相关文件: runtime/optwin.vim Patch 6.2.516 问题: The sign column cannot be seen, looks like there are two spaces before the text. (Rob Retter) 解决方案: Add the SignColumn highlight group. 相关文件: runtime/doc/options.txt, runtime/doc/sign.txt, src/option.c, src/screen.c, src/syntax.c, src/vim.h Patch 6.2.517 问题: Using "r*" in Visual mode on multibyte characters replaces too many characters. In Visual Block mode replacing with a multibyte character doesn't work. 解决方案: Adjust the operator end for the difference in byte length of the original and the replaced character. Insert all bytes of a multibyte character, take care of double-wide characters. 相关文件: src/ops.c Patch 6.2.518 问题: Last line of a window is not updated after using "J" and then "D". (Adri Verhoef) 解决方案: When no line is found below a change that doesn't need updating, update all lines below the change. 相关文件: src/screen.c Patch 6.2.519 问题: Mac: cannot read/write files in MacRoman format. 解决方案: Do internal conversion from/to MacRoman to/from utf-8 and latin1. (Eckehard Berns) 相关文件: src/fileio.c Patch 6.2.520 (extra) 问题: The NSIS installer is outdated. 解决方案: Make it work with NSIS 2.0. Also include console executables for Win 95/98/ME and Win NT/2000/XP. Use LZWA compression. Use "/oname" to avoid having to rename files before running NSIS. 相关文件: Makefile, nsis/gvim.nsi Patch 6.2.521 问题: When using silent Ex mode the "changing a readonly file" warning is omitted but the one second wait isn't. (Yakov Lerner) 解决方案: Skip the delay when "silent_mode" is set. 相关文件: src/misc1.c Patch 6.2.522 问题: GUI: when changing 'cmdheight' in the gvimrc file the window layout is messed up. (Keith Dart) 解决方案: Skip updating the window layout when changing 'cmdheight' while still starting up. 相关文件: src/option.c Patch 6.2.523 问题: When loading a session and aborting when a swap file already exists, the user is left with useless windows. (Robert Webb) 解决方案: Load one file before creating the windows. 相关文件: src/ex_docmd.c Patch 6.2.524 (extra, after 6.2.520) 问题: Win32: (un)installing gvimext.dll may fail if it was used. The desktop and start menu links are created for the current user instead of all users. Using the home directory as working directory for the links is a bad idea for multi-user systems. Cannot use Vim from the "Open With..." menu. 解决方案: Force a reboot if necessary. (Alejandro Lopez-Valencia) Also use macros for the directory of the source and runtime files. Use "CSIDL_COMMON_*" instead of "CSIDL_*" when possible. Do not specify a working directory in the links. Add Vim to the "Open With..." menu. (Giuseppe Bilotta) 相关文件: nsis/gvim.nsi, src/dosinst.c, src/dosinst.h, src/uninstal.c Patch 6.2.525 问题: When the history contains a very long line ":history" causes a crash. (Volker Kiefel) 解决方案: Shorten the history entry to fit it in one line. 相关文件: src/ex_getln.c Patch 6.2.526 问题: When s:lang is "ja" the Japanese menus are not used. 解决方案: Add 'encoding' to the language when there is no charset. 相关文件: runtime/menu.vim Patch 6.2.527 问题: The 2html script uses ":wincmd p", which breaks when using some autocommands. 解决方案: Remember the window numbers and jump to them with ":wincmd w". Also add XHTML support. (Panagiotis Issaris) 相关文件: runtime/syntax/2html.vim Patch 6.2.528 问题: NetBeans: Changes of the "~" command are not reported. 解决方案: Call netbeans_inserted() after performing "~". (Gordon Prieur) Also change NetBeans debugging to append to the log file. Also fix that "~" in Visual block mode changes too much if there are multibyte characters. 相关文件: src/nbdebug.c, src/normal.c, src/ops.c Patch 6.2.529 (extra) 问题: VisVim only works for Admin. Doing it for one user doesn't work. (Alexandre Gouraud) 解决方案: When registering the module fails, simply continue. 相关文件: src/VisVim/VisVim.cpp Patch 6.2.530 问题: Warning for missing prototype on the Amiga. 解决方案: Include time.h 相关文件: src/version.c Patch 6.2.531 问题: In silent ex mode no messages are given, which makes debugging very difficult. 解决方案: Do output messages when 'verbose' is set. 相关文件: src/message.c, src/ui.c Patch 6.2.532 (extra) 问题: Compiling for Win32s with VC 4.1 doesn't work. 解决方案: Don't use CP_UTF8 if it's not defined. Don't use CSIDL_COMMON* when not defined. 相关文件: src/dosinst.h, src/fileio.c Win32 console: After patch 6.2.398 Ex mode did not work. (Yasuhiro Matsumoto) Patch 6.3a.001 问题: Win32: if testing for the "--binary" option fails, diff isn't used at all. 解决方案: Handle the "ok" flag properly. (Yasuhiro Matsumoto) 相关文件: src/diff.c Patch 6.3a.002 问题: NetBeans: An insert command from NetBeans beyond the end of a buffer crashes Vim. (Xavier de Gaye) 解决方案: Use a local pos_T structure for the position. 相关文件: src/netbeans.c Patch 6.3a.003 问题: E315 error with auto-formatting comments. (Henry Van Roessel) 解决方案: Pass the line number to same_leader(). 相关文件: src/ops.c Patch 6.3a.004 问题: Test32 fails on Windows XP for the DJGPP version. Renaming test11.out fails. 解决方案: Don't try renaming, create new files to use for the test. 相关文件: src/testdir/test32.in, src/testdir/test32.ok Patch 6.3a.005 问题: ":checkpath!" does not use 'includeexpr'. 解决方案: Use a file name that was found directly. When a file was not found and the located name is empty, use the rest of the line. 相关文件: src/search.c Patch 6.3a.006 问题: "yip" moves the cursor to the first yanked line, but not to the first column. Looks like not all text was yanked. (Jens Paulus) 解决方案: Move the cursor to the first column. 相关文件: src/search.c Patch 6.3a.007 问题: 'cindent' recognizes "enum" but not "typedef enum". 解决方案: Skip over "typedef" before checking for "enum". (Helmut Stiegler) Also avoid that searching for this item goes too far back. 相关文件: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok Patch 6.3a.008 (extra) 问题: Windows 98: Some of the wide functions are not implemented, resulting in file I/O to fail. This depends on what Unicode support is installed. 解决方案: Handle the failure and fall back to non-wide functions. 相关文件: src/os_win32.c Patch 6.3a.009 问题: Win32: Completion of filenames does not work properly when 'encoding' differs from the active code page. 解决方案: Use wide functions for expanding wildcards when appropriate. 相关文件: src/misc1.c Patch 6.3a.010 (extra) 问题: Win32: Characters in the window title that do not appear in the active codepage are replaced by a question mark. 解决方案: Use DefWindowProcW() instead of DefWindowProc() when possible. 相关文件: src/glbl_ime.cpp, src/globals.h, src/proto/gui_w16.pro, src/proto/gui_w32.pro, src/gui_w16.c, src/gui_w32.c, src/gui_w48.c Patch 6.3a.011 问题: Using the explorer plugin changes a local directory to the global directory. 解决方案: Don't use ":chdir" to restore the current directory. Make "expand('%:p')" remove "/../" and "/./" items from the path. 相关文件: runtime/plugin/explorer.vim, src/eval.c, src/os_unix.c Patch 6.3a.012 (extra) 问题: On Windows 98 the installer doesn't work, don't even get the "I agree" button. The check for the path ending in "vim" makes the browse dialog hard to use. The default path when no previous Vim is installed is "c:\vim" instead of "c:\Program Files\Vim". 解决方案: Remove the background gradient command. Change the .onVerifyInstDir function to a leave function for the directory page. Don't let the install program default to c:\vim when no path could be found. 相关文件: nsis/gvim.nsi, src/dosinst.c Patch 6.3a.013 (extra) 问题: Win32: Characters in the menu that are not in the active codepage are garbled. 解决方案: Convert menu strings from 'encoding' to the active codepage. 相关文件: src/gui_w32.c, src/gui_w48.c Patch 6.3a.014 问题: Using multibyte text and highlighting in a statusline causes gaps to appear. (Helmut Stiegler) 解决方案: Advance the column by text width instead of number of bytes. Add the vim_strnsize() function. 相关文件: src/charset.c, src/proto/charset.pro, src/screen.c Patch 6.3a.015 问题: Using the "select all" menu item when 'insertmode' is set and clicking the mouse button doesn't return to Insert mode. The Buffers/Delete menu doesn't offer a choice to abandon a changed buffer. (Jens Paulus) 解决方案: Don't use CTRL-\ CTRL-N. Add ":confirm" for the Buffers menu items. 相关文件: runtime/menu.vim Patch 6.3a.016 问题: After cancelling the ":confirm" dialog the error message and hit-enter prompt may not be displayed properly. 解决方案: Flush output after showing the dialog. 相关文件: src/message.c Patch 6.3a.017 问题: servername() doesn't work when Vim was started with the "-X" argument or when the "exclude" in 'clipboard' matches the terminal name. (Robert Nowotniak) 解决方案: Force connecting to the X server when using client-server commands. 相关文件: src/eval.c, src/globals.h, src/os_unix.c Patch 6.3a.018 (after 6.3a.017) 问题: Compiler warning for return value of make_connection(). 解决方案: Use void return type. 相关文件: src/eval.c Patch 6.3a.019 (extra) 问题: Win32: typing non-latin1 characters doesn't work. 解决方案: Invoke _OnChar() directly to avoid that the argument is truncated to a byte. Convert the UTF-16 character to bytes according to 'encoding' and ignore 'termencoding'. Same for _OnSysChar(). 相关文件: src/gui_w32.c, src/gui_w48.c Patch 6.3a.020 (extra) 问题: Missing support for AROS (AmigaOS reimplementation). Amiga GUI doesn't work. 解决方案: Add AROS support. (Adam Chodorowski) Fix Amiga GUI problems. (Georg Steger, Ali Akcaagac) 相关文件: Makefile, src/Make_aros.mak, src/gui_amiga.c, src/gui_amiga.h, src/memfile.c, src/os_amiga.c, src/term.c Patch 6.3a.021 (after 6.3a.017) 问题: Can't compile with X11 but without GUI. 解决方案: Put use of "gui.in_use" inside an #ifdef. 相关文件: src/eval.c Patch 6.3a.022 问题: When typing Tabs when 'softtabstop' is used and 'list' is set a tab is counted for two spaces. 解决方案: Use the "L" flag in 'cpoptions' to tell whether a tab is counted as two spaces or as 'tabstop'. (Antony Scriven) 相关文件: runtime/doc/options.txt, src/edit.c Patch 6.3a.023 问题: Completion on the command line doesn't handle backslashes properly. Only the tail of matches is shown, even when not completing filenames. 解决方案: When turning the string into a pattern double backslashes. Don't omit the path when not expanding files or directories. 相关文件: src/ex_getln.c Patch 6.3a.024 问题: The "save all" toolbar item fails for buffers that don't have a name. When using ":wa" or closing the Vim window and there are nameless buffers, browsing for a name may cause the name being given to the wrong buffer or not stored properly. ":browse" only worked for one file. 解决方案: Use ":confirm browse" for "save all". Pass buffer argument to setfname(). Restore "browse" flag and "forceit" after doing the work for one file. 相关文件: runtime/menu.vim, src/buffer.c, src/ex_cmds.c, src/ex_cmds2.c, src/ex_docmd.c, src/ex_getln.c, src/fileio.c, src/memline.c, src/message.c, src/window.c, src/proto/buffer.pro, src/proto/ex_cmds2.pro, src/proto/memline.pro Patch 6.3a.025 问题: Setting 'virtualedit' moves the cursor. (Benji Fisher) 解决方案: Update the virtual column before using it. 相关文件: src/option.c Patch 6.3a.026 (extra, after 6.3a.008) 问题: Editing files on Windows 98 doesn't work when 'encoding' is "utf-8" (Antoine Mechelynck) Warning for missing function prototype. 解决方案: For all wide functions check if it failed because it is not implemented. Use ANSI function declaration for char_to_string(). 相关文件: src/gui_w48.c, src/os_mswin.c, src/os_win32.c Patch 6.3a.027 (extra, after 6.3a.026) 问题: Compiler warning for function argument. 解决方案: Declare both char and WCHAR arrays. 相关文件: src/gui_w48.c Patch 6.3a.028 问题: ":normal ." doesn't work inside a function, because redo is saved and restored. (Benji Fisher) 解决方案: Make a copy of the redo buffer when executing a function. 相关文件: src/getchar.c Patch 6.3b.001 (extra) 问题: Bcc 5: The generated auto/pathdef can't be compiled. 解决方案: Fix the way quotes and backslashes are escaped. 相关文件: src/Make_bc5.mak Patch 6.3b.002 问题: Win32: conversion during file write fails when a double-byte character is split over two writes. 解决方案: Fix the conversion retry without a trailing byte. (Taro Muraoka) 相关文件: src/fileio.c Patch 6.3b.003 (extra) 问题: Win32: When compiling with Borland C 5.5 and 'encoding' is "utf-8" then Vim can't open files under MS-Windows 98. (Antoine J. Mechelynck) 解决方案: Don't use _wstat(), _wopen() and _wfopen() in this situation. 相关文件: src/os_mswin.c, src/os_win32.c Patch 6.3b.004 问题: ":helpgrep" includes a trailing CR in the text line. 解决方案: Remove the CR. 相关文件: src/quickfix.c Patch 6.3b.005 问题: ":echo &g:ai" results in the local option value. (Salman Halim) 解决方案: Pass the flags from find_option_end() to get_option_value(). 相关文件: src/eval.c Patch 6.3b.006 问题: When using "mswin.vim", CTRL-V in Insert mode leaves cursor before last pasted character. (Mathew Davis) 解决方案: Use the same Paste() function as in menu.vim. 相关文件: runtime/mswin.vim Patch 6.3b.007 问题: Session file doesn't restore view on windows properly. (Robert Webb) 解决方案: Restore window sizes both before and after restoring the view, so that the view, cursor position and size are restored properly. 相关文件: src/ex_docmd.c Patch 6.3b.008 问题: Using ":finally" in a user command doesn't always work. (Hari Krishna Dara) 解决方案: Don't assume that using getexline() means the command was typed. 相关文件: src/ex_docmd.c Patch 6.3b.009 (extra) 问题: Win32: When the -P argument is not found in a window title, there is no error message. 解决方案: When the window can't be found give an error message and exit. Also use try/except to catch failing to open the MDI window. (Michael Wookey) 相关文件: src/gui_w32.c Patch 6.3b.010 问题: Win32: Using the "-D" argument and expanding arguments may cause a hang, because the terminal isn't initialized yet. (Vince Negri) 解决方案: Don't go into debug mode before the terminal is initialized. 相关文件: src/main.c Patch 6.3b.011 问题: Using CTRL-\ e while obtaining an expression aborts the command line. (Hari Krishna Dara) 解决方案: Insert the CTRL-\ e as typed. 相关文件: src/ex_getln.c Patch 6.3b.012 (after 6.3b.010) 问题: Can't compile with tiny features. (Norbert Tretkowski) 解决方案: Add #ifdefs. 相关文件: src/main.c Patch 6.3b.013 问题: Loading a session file results in editing the wrong file in the first window when this is not the file at the current position in the argument list. (Robert Webb) 解决方案: Check w_arg_idx_invalid to decide whether to edit a file. 相关文件: src/ex_docmd.c Patch 6.3b.014 问题: ":runtime! foo*.vim" may using freed memory when a sourced script changes the value of 'runtimepath'. 解决方案: Make a copy of 'runtimepath' when looping over the matches. 相关文件: src/ex_cmds2.c Patch 6.3b.015 问题: Get lalloc(0) error when using "p" in Visual mode while 'clipboard' contains "autoselect,unnamed". (Mark Wagonner) 解决方案: Avoid allocating zero bytes. Obtain the clipboard when necessary. 相关文件: src/ops.c Patch 6.3b.016 问题: When 'virtualedit' is used "x" doesn't delete the last character of a line that has as many characters as 'columns'. (Yakov Lerner) 解决方案: When the cursor isn't moved let oneright() return FAIL. 相关文件: src/edit.c Patch 6.3b.017 问题: Win32: "vim --remote-wait" doesn't exit when the server finished editing the file. (David Fishburn) 解决方案: In the rrhelper plugin change backslashes to forward slashes and escape special characters. 相关文件: runtime/plugin/rrhelper.vim Patch 6.3b.018 问题: The list of help files in the "local additions" table doesn't recognize utf-8 encoding. (Yasuhiro Matsumoto) 解决方案: Recognize utf-8 characters. 相关文件: src/ex_cmds.c Patch 6.3b.019 问题: When $VIMRUNTIME is not a full path name the "local additions" table lists all the help files. 解决方案: Use fullpathcmp() instead of fnamecmp() to compare the directory names. 相关文件: src/ex_cmds.c Patch 6.3b.020 问题: When using CTRL-^ when entering a search string, the item in the statusline that indicates the keymap is not updated. (Ilya Dogolazky) 解决方案: Mark the statuslines for updating. 相关文件: src/ex_getln.c Patch 6.3b.021 问题: The swapfile is not readable for others, the ATTENTION prompt does not show all info when someone else is editing the same file. (Marcel Svitalsky) 解决方案: Use the protection of original file for the swapfile and set it after creating the swapfile. 相关文件: src/fileio.c Patch 6.3b.022 问题: Using "4v" to select four times the old Visual area may put the cursor beyond the end of the line. (Jens Paulus) 解决方案: Correct the cursor column. 相关文件: src/normal.c Patch 6.3b.023 问题: When "3dip" starts in an empty line, white lines after the non-white lines are not deleted. (Jens Paulus) 解决方案: Include the white lines. 相关文件: src/search.c Patch 6.3b.024 问题: "2daw" does not delete leading white space like "daw" does. (Jens Paulus) 解决方案: Include the white space when a count is used. 相关文件: src/search.c Patch 6.3b.025 问题: Percentage in ruler isn't updated when a line is deleted. (Jens Paulus) 解决方案: Check for a change in line count when deciding to update the ruler. 相关文件: src/screen.c, src/structs.h Patch 6.3b.026 问题: When selecting "abort" at the ATTENTION prompt for a file that is already being edited Vim crashes. 解决方案: Don't abort creating a new buffer when we really need it. 相关文件: src/buffer.c, src/vim.h Patch 6.3b.027 问题: Win32: When enabling the menu in a maximized window, Vim uses more lines than what is room for. (Shizhu Pan) 解决方案: When deciding to call shell_resized(), also compare the text area size with Rows and Columns, not just with screen_Rows and screen_Columns. 相关文件: src/gui.c Patch 6.3b.028 问题: When in diff mode, setting 'rightleft' causes a crash. (Eddine) 解决方案: Check for last column differently when 'rightleft' is set. 相关文件: src/screen.c Patch 6.3b.029 问题: Win32: warning for uninitialized variable. 解决方案: Initialize to zero. 相关文件: src/misc1.c Patch 6.3b.030 问题: After Visually selecting four characters, changing it to other text, Visually selecting and yanking two characters: "." changes four characters, another "." changes two characters. (Robert Webb) 解决方案: Don't store the size of the Visual area when redo is active. 相关文件: src/normal.c

6.4 版 本 version-6.4

本小节讨论 6.3 和 6.4 版本之间的改进。 这是一个漏洞修正版。也有一些新特性。主要的新项目来自运行时文件和翻译。 MS-Windows 的 big 版本现在使用: Ruby 1.8.3 版本 Perl 5.8.7 版本 Python 2.4.2 版本 改动 changed-6.4

删除了 runtime/tools/tcltags,Exuberant ctags 做得更好。 新增 added-6.4

Alsaconf 语法文件 (Nikolai Weibull) Eruby 语法、缩进、编译器和文件类型插件文件 (Doug Kearns) Esterel 语法文件 (Maurizio Tranchero) Mathematica 缩进文件 (Steve Layland) Netrc 语法文件 (Nikolai Weibull) PHP 编译器文件 (Doug Kearns) Pascal 缩进文件 (Neil Carter) Prescribe 语法文件 (Klaus Muth) Rubyunit 编译器文件 (Doug Kearns) SMTPrc 语法文件 (Kornel Kielczewski) Sudoers 语法文件 (Nikolai Weibull) TPP 语法文件 (Gerfried Fuchs) VHDL 文件类型插件文件 (R. Shankar) Verilog-AMS 语法文件 (S. Myles Prather) 保加利亚键盘映射表 (Alberto Mardegan) 加拿大键盘映射表 (Eric Joanis) 匈牙利语菜单翻译,UTF-8 格式 (Kantra Gergely) 乌克兰语菜单翻译 (Bohdan Vlasyuk) 爱尔兰语消息翻译 (Kevin Patrick Scannell) configure 也加入 tclsh8.4 的检查。 修正 fixed-6.4

"dFxd;" deleted the character under the cursor, "d;" didn't remember the exclusiveness of the motion. When using "set laststatus=2 cmdheight=2" in the .gvimrc you may only get one line for the cmdline. (Christian Robinson) Invoke command_height() after the GUI has started up. Gcc would warn "dereferencing type-punned pointer will break strict -aliasing rules". Avoid using typecasts for variable pointers. Gcc 3.x interprets the -MM argument differently. Change "-I /path" to "-isystem /path" for "make depend". Patch 6.3.001 问题: ":browse split" gives the file selection dialog twice. (Gordon Bazeley) Same problem for ":browse diffpatch". 解决方案: Reset cmdmod.browse before calling do_ecmd(). 相关文件: src/diff.c, src/ex_docmd.c Patch 6.3.002 问题: When using translated help files with non-ASCII latin1 characters in the first line the utf-8 detection is wrong. 解决方案: Properly detect utf-8 characters. When a mix of encodings is detected continue with the next language and avoid a "no matches" error because of "got_int" being set. Add the directory name to the error message for a duplicate tag. 相关文件: src/ex_cmds.c Patch 6.3.003 问题: Crash when using a console dialog and the first choice does not have a default button. (Darin Ohashi) 解决方案: Allocate two more characters for the [] around the character for the default choice. 相关文件: src/message.c Patch 6.3.004 问题: When searching for a long string (140 chars in a 80 column terminal) get three hit-enter prompts. (Robert Webb) 解决方案: Avoid the hit-enter prompt when giving the message for wrapping around the end of the buffer. Don't give that message again when the string was not found. 相关文件: src/message.c, src/search.c Patch 6.3.005 问题: Crash when searching for a pattern with a character offset and starting in a closed fold. (Frank Butler) 解决方案: Check for the column to be past the end of the line. Also fix that a pattern with a character offset relative to the end isn't read back from the viminfo properly. 相关文件: src/search.c Patch 6.3.006 问题: ":breakadd file *foo" prepends the current directory to the file pattern. (Hari Krishna Dara) 解决方案: Keep the pattern as-is. 相关文件: src/ex_cmds2.c Patch 6.3.007 问题: When there is a buffer with 'buftype' set to "nofile" and using a ":cd" command, the swap file is not deleted when exiting. 解决方案: Use the full path of the swap file also for "nofile" buffers. 相关文件: src/fileio.c Patch 6.3.008 问题: Compiling fails under OS/2. 解决方案: Include "e_screenmode" also for OS/2. (David Sanders) 相关文件: src/globals.h Patch 6.3.009 (after 6.3.006) 问题: ":breakadd file /path/foo.vim" does not match when a symbolic link is involved. (Servatius Brandt) 解决方案: Do expand the pattern when it does not start with "*". 相关文件: runtime/doc/repeat.txt, src/ex_cmds2.c Patch 6.3.010 问题: When writing to a named pipe there is an error for fsync() failing. 解决方案: Ignore the fsync() error for devices. 相关文件: src/fileio.c Patch 6.3.011 问题: Crash when the completion function of a user-command uses a "normal :cmd" command. (Hari Krishna Dara) 解决方案: Save the command line when invoking the completion function. 相关文件: src/ex_getln.c Patch 6.3.012 问题: Internal lalloc(0) error when using a complicated multi-line pattern in a substitute command. (Luc Hermitte) 解决方案: Avoid going past the end of a line. 相关文件: src/ex_cmds.c Patch 6.3.013 问题: Crash when editing a command line and typing CTRL-R = to evaluate a function that uses "normal :cmd". (Hari Krishna Dara) 解决方案: Save and restore the command line when evaluating an expression for CTRL-R =. 相关文件: src/ex_getln.c, src/ops.c, src/proto/ex_getln.pro, src/proto/ops.pro Patch 6.3.014 问题: When using Chinese or Taiwanese the default for 'helplang' is wrong. (Simon Liang) 解决方案: Use the part of the locale name after "zh_". 相关文件: src/option.c Patch 6.3.015 问题: The string that winrestcmd() returns may end in garbage. 解决方案: NUL-terminate the string. (Walter Briscoe) 相关文件: src/eval.c Patch 6.3.016 问题: The default value for 'define' has "\s" before '#'. 解决方案: Add a star after "\s". (Herculano de Lima Einloft Neto) 相关文件: src/option.c Patch 6.3.017 问题: "8zz" may leave the cursor beyond the end of the line. (Niko Maatjes) 解决方案: Correct the cursor column after moving to another line. 相关文件: src/normal.c Patch 6.3.018 问题: ":0argadd zero" added the argument after the first one, instead of before it. (Adri Verhoef) 解决方案: Accept a zero range for ":argadd". 相关文件: src/ex_cmds.h Patch 6.3.019 问题: Crash in startup for debug version. (David Rennals) 解决方案: Move the call to nbdebug_wait() to after allocating NameBuff. 相关文件: src/main.c Patch 6.3.020 问题: When 'encoding' is "utf-8" and 'delcombine' is set, "dw" does not delete a word but only a combining character of the first character, if there is one. (Raphael Finkel) 解决方案: Correctly check that one character is being deleted. 相关文件: src/misc1.c Patch 6.3.021 问题: When the last character of a file name is a multibyte character and the last byte is a path separator, the file cannot be edited. 解决方案: Check for the last byte to be part of a multibyte character. (Taro Muraoka) 相关文件: src/fileio.c Patch 6.3.022 (extra) 问题: Win32: When the last character of a file name is a multibyte character and the last byte is a path separator, the file cannot be written. A trail byte that is a space makes that a file cannot be opened from the command line. 解决方案: Recognize double-byte characters when parsing the command line. In mch_stat() check for the last byte to be part of a multibyte character. (Taro Muraoka) 相关文件: src/gui_w48.c, src/os_mswin.c Patch 6.3.023 问题: When the "to" part of a mapping starts with its "from" part, abbreviations for the same characters is not possible. For example, when <Space> is mapped to something that starts with a space, typing <Space> does not expand abbreviations. 解决方案: Only disable expanding abbreviations when a mapping is not remapped, don't disable it when the RHS of a mapping starts with the LHS. 相关文件: src/getchar.c, src/vim.h Patch 6.3.024 问题: In a few places a string in allocated memory is not terminated with a NUL. 解决方案: Add ga_append(NUL) in script_get(), gui_do_findrepl() and serverGetVimNames(). 相关文件: src/ex_getln.c, src/gui.c, src/if_xcmdsrv.c, src/os_mswin.c Patch 6.3.025 (extra) 问题: Missing NUL for list of server names. 解决方案: Add ga_append(NUL) in serverGetVimNames(). 相关文件: src/os_mswin.c Patch 6.3.026 问题: When ~/.vim/after/syntax/syncolor.vim contains a command that reloads the colors an endless loop and/or a crash may occur. 解决方案: Only free the old value of an option when it was originally allocated. Limit recursiveness of init_highlight() to 5 levels. 相关文件: src/option.c, src/syntax.c Patch 6.3.027 问题: VMS: Writing a file may insert extra CR characters. Not all terminals are recognized correctly. Vt320 doesn't support colors. Environment variables are not expanded correctly. 解决方案: Use another method to write files. Add vt320 termcap codes for colors. (Zoltan Arpadffy) 相关文件: src/fileio.c, src/misc1.c, src/os_unix.c, src/structs.h, src/term.c Patch 6.3.028 问题: When appending to a file the BOM marker may be written. (Alex Jakushev) 解决方案: Do not write the BOM marker when appending. 相关文件: src/fileio.c Patch 6.3.029 问题: Crash when inserting a line break. (Walter Briscoe) 解决方案: In the syntax highlighting code, don't use an old state after a change was made, current_col may be past the end of the line. 相关文件: src/syntax.c Patch 6.3.030 问题: GTK 2: Crash when sourcing a script that deletes the menus, sets 'encoding' to "utf-8" and loads the menus again. GTK error message when tooltip text is in a wrong encoding. 解决方案: Don't copy characters from the old screen to the new screen when switching 'encoding' to utf-8, they may be invalid. Only set the tooltip when it is valid utf-8. 相关文件: src/gui_gtk.c, src/mbyte.c, src/proto/mbyte.pro, src/screen.c Patch 6.3.031 问题: When entering a mapping and pressing Tab halfway the command line isn't redrawn properly. (Adri Verhoef) 解决方案: Reposition the cursor after drawing over the "..." of the completion attempt. 相关文件: src/ex_getln.c Patch 6.3.032 问题: Using Python 2.3 with threads doesn't work properly. 解决方案: Release the lock after initialization. 相关文件: src/if_python.c Patch 6.3.033 问题: When a mapping ends in a Normal mode command of more than one character Vim doesn't return to Insert mode. 解决方案: Check that the mapping has ended after obtaining all characters of the Normal mode command. 相关文件: src/normal.c Patch 6.3.034 问题: VMS: crash when using ":help". 解决方案: Avoid using "tags-??", some Open VMS systems can't handle the "?" wildcard. (Zoltan Arpadffy) 相关文件: src/tag.c Patch 6.3.035 (extra) 问题: RISC OS: Compile errors. 解决方案: Change e_screnmode to e_screenmode. Change the way __riscosify_control is set. Improve the makefile. (Andy Wingate) 相关文件: src/os_riscos.c, src/search.c, src/Make_ro.mak Patch 6.3.036 问题: ml_get errors when the whole file is a fold, switching 'foldmethod' and doing "zj". (Christian J. Robinson) Was not deleting the fold but creating a fold with zero lines. 解决方案: Delete the fold properly. 相关文件: src/fold.c Patch 6.3.037 (after 6.3.032) 问题: Warning for unused variable. 解决方案: Change the #ifdefs for the saved thread stuff. 相关文件: src/if_python.c Patch 6.3.038 (extra) 问题: Win32: When the "file changed" dialog pops up after a click that gives gvim focus and not moving the mouse after that, the effect of the click may occur when moving the mouse later. (Ken Clark) Happened because the release event was missed. 解决方案: Clear the s_button_pending variable when any input is received. 相关文件: src/gui_w48.c Patch 6.3.039 问题: When 'number' is set and inserting lines just above the first displayed line (in another window on the same buffer), the line numbers are not updated. (Hitier Sylvain) 解决方案: When 'number' is set and lines are inserted/deleted redraw all lines below the change. 相关文件: src/screen.c Patch 6.3.040 问题: Error handling does not always work properly and may cause a buffer to be marked as if it's viewed in a window while it isn't. Also when selecting "Abort" at the attention prompt. 解决方案: Add enter_cleanup() and leave_cleanup() functions to move saving/restoring things for error handling to one place. Clear a buffer read error when it's unloaded. 相关文件: src/buffer.c, src/ex_docmd.c, src/ex_eval.c, src/proto/ex_eval.pro, src/structs.h, src/vim.h Patch 6.3.041 (extra) 问题: Win32: When the path to a file has Russian characters, ":cd %:p:h" doesn't work. (Valery Kondakoff) 解决方案: Use a wide function to change directory. 相关文件: src/os_mswin.c Patch 6.3.042 问题: When there is a closed fold at the top of the window, CTRL-X CTRL-E in Insert mode reduces the size of the fold instead of scrolling the text up. (Gautam) 解决方案: Scroll over the closed fold. 相关文件: src/move.c Patch 6.3.043 问题: 'hlsearch' highlighting sometimes disappears when inserting text in PHP code with syntax highlighting. (Marcel Svitalsky) 解决方案: Don't use pointers to remember where a match was found, use an index. The pointers may become invalid when searching in other lines. 相关文件: src/screen.c Patch 6.3.044 (extra) 问题: Mac: When 'linespace' is non-zero the Insert mode cursor leaves pixels behind. (Richard Sandilands) 解决方案: Erase the character cell before drawing the text when needed. 相关文件: src/gui_mac.c Patch 6.3.045 问题: Unusual characters in an option value may cause unexpected behavior, especially for a modeline. (Ciaran McCreesh) 解决方案: Don't allow setting termcap options or 'printdevice' in a modeline. Don't list options for "termcap" and "all" in a modeline. Don't allow unusual characters in 'filetype', 'syntax', 'backupext', 'keymap', 'patchmode' and 'langmenu'. 相关文件: src/option.c, runtime/doc/options.txt Patch 6.3.046 问题: ":registers" doesn't show multibyte characters properly. (Valery Kondakoff) 解决方案: Get the length of each character before displaying it. 相关文件: src/ops.c Patch 6.3.047 (extra) 问题: Win32 with Borland C 5.5 on Windows XP: A new file is created with read-only attributes. (Tony Mechelynck) 解决方案: Don't use the _wopen() function for Borland. 相关文件: src/os_win32.c Patch 6.3.048 (extra) 问题: Build problems with VMS on IA64. 解决方案: Add dependencies to the build file. (Zoltan Arpadffy) 相关文件: src/Make_vms.mms Patch 6.3.049 (after 6.3.045) 问题: Compiler warning for "char" vs "char_u" mixup. (Zoltan Arpadffy) 解决方案: Add a typecast. 相关文件: src/option.c Patch 6.3.050 问题: When SIGHUP is received while busy exiting, non-reentrant functions such as free() may cause a crash. 解决方案: Ignore SIGHUP when exiting because of an error. (Scott Anderson) 相关文件: src/misc1.c, src/main.c Patch 6.3.051 问题: When 'wildmenu' is set and completed file names contain multibyte characters Vim may crash. 解决方案: Reserve room for multibyte characters. (Yasuhiro Matsumoto) 相关文件: src/screen.c Patch 6.3.052 (extra) 问题: Windows 98: typed keys that are not ASCII may not work properly. For example with a Russian input method. (Jiri Jezdinsky) 解决方案: Assume that the characters arrive in the current codepage instead of UCS-2. Perform conversion based on that. 相关文件: src/gui_w48.c Patch 6.3.053 问题: Win32: ":loadview" cannot find a file with non-ASCII characters. (Valerie Kondakoff) 解决方案: Use mch_open() instead of open() to open the file. 相关文件: src/ex_cmds2.c Patch 6.3.054 问题: When 'insertmode' is set <C-L>4ixxx<C-L> hangs Vim. (Jens Paulus) Vim is actually still working but redraw is disabled. 解决方案: When stopping Insert mode with CTRL-L don't put an Esc in the redo buffer but a CTRL-L. 相关文件: src/edit.c Patch 6.3.055 (after 6.3.013) 问题: Can't use getcmdline(), getcmdpos() or setcmdpos() with <C-R>= when editing a command line. Using <C-\>e may crash Vim. (Peter Winters) 解决方案: When moving ccline out of the way for recursive use, make it available to the functions that need it. Also save and restore ccline when calling get_expr_line(). Make ccline.cmdbuf NULL at the end of getcmdline(). 相关文件: src/ex_getln.c Patch 6.3.056 问题: The last characters of a multibyte file name may not be displayed in the window title. 解决方案: Avoid to remove a multibyte character where the last byte looks like a path separator character. (Yasuhiro Matsumoto) 相关文件: src/buffer.c, src/ex_getln.c Patch 6.3.057 问题: When filtering lines folds are not updated. (Carl Osterwisch) 解决方案: Update folds for filtered lines. 相关文件: src/ex_cmds.c Patch 6.3.058 问题: When 'foldcolumn' is equal to the window width and 'wrap' is on Vim may crash. Disabling the vertical split feature breaks compiling. (Peter Winters) 解决方案: Check for zero room for wrapped text. Make compiling without vertical splits possible. 相关文件: src/move.c, src/quickfix.c, src/screen.c, src/netbeans.c Patch 6.3.059 问题: Crash when expanding an ":edit" command containing several spaces with the shell. (Brian Hirt) 解决方案: Allocate enough space for the quotes. 相关文件: src/os_unix.c Patch 6.3.060 问题: Using CTRL-R CTRL-O in Insert mode with an invalid register name still causes something to be inserted. 解决方案: Check the register name for being valid. 相关文件: src/edit.c Patch 6.3.061 问题: When editing a utf-8 file in an utf-8 xterm and there is a multibyte character in the last column, displaying is messed up. (Joël Rio) 解决方案: Check for a multibyte character, not a multi-column character. 相关文件: src/screen.c Patch 6.3.062 问题: ":normal! gQ" hangs. 解决方案: Quit getcmdline() and do_exmode() when out of typeahead. 相关文件: src/ex_getln.c, src/ex_docmd.c Patch 6.3.063 问题: When a CursorHold autocommand changes to another window (temporarily) 'mousefocus' stops working. 解决方案: Call gui_mouse_correct() after triggering CursorHold. 相关文件: src/gui.c Patch 6.3.064 问题: line2byte(line("$") + 1) sometimes returns the wrong number. (Charles Campbell) 解决方案: Flush the cached line before counting the bytes. 相关文件: src/memline.c Patch 6.3.065 问题: The euro digraph doesn't always work. 解决方案: Add an "e=" digraph for Unicode euro character and adjust the help files. 相关文件: src/digraph.c, runtime/doc/digraph.txt Patch 6.3.066 问题: Backup file may get wrong permissions. 解决方案: Use permissions of original file for backup file in more places. 相关文件: src/fileio.c Patch 6.3.067 (after 6.3.066) 问题: Newly created file gets execute permission. 解决方案: Check for "perm" to be negative before using it. 相关文件: src/fileio.c Patch 6.3.068 问题: When editing a compressed file xxx.gz which is a symbolic link to the actual file a ":write" renames the link. 解决方案: Resolve the link, so that the actual file is renamed and compressed. 相关文件: runtime/plugin/gzip.vim Patch 6.3.069 问题: When converting text with illegal characters Vim may crash. 解决方案: Avoid that too much is subtracted from the length. (Da Woon Jung) 相关文件: src/mbyte.c Patch 6.3.070 问题: After ":set number linebreak wrap" and a vertical split, moving the vertical separator far left will crash Vim. (Georg Dahn) 解决方案: Avoid dividing by zero. 相关文件: src/charset.c Patch 6.3.071 问题: The message for CTRL-X mode is still displayed after an error for 'thesaurus' or 'dictionary' being empty. 解决方案: Clear "edit_submode". 相关文件: src/edit.c Patch 6.3.072 问题: Crash in giving substitute message when language is Chinese and encoding is utf-8. (Yongwei) 解决方案: Make the msg_buf size larger when using multibyte. 相关文件: src/vim.h Patch 6.3.073 问题: Win32 GUI: When the Vim window is partly above or below the screen, scrolling causes display errors when the taskbar is not on that side. 解决方案: Use the SW_INVALIDATE flag when the Vim window is partly below or above the screen. 相关文件: src/gui_w48.c Patch 6.3.074 问题: When mswin.vim is used and 'insertmode' is set, typing text in Select mode and then using CTRL-V results in <SNR>99_Pastegi. (Georg Dahn) 解决方案: When restart_edit is set use "d" instead of "c" to remove the selected text to avoid calling edit() twice. 相关文件: src/normal.c Patch 6.3.075 问题: After unloading another buffer, syntax highlighting in the current buffer may be wrong when it uses "containedin". (Eric Arnold) 解决方案: Use "buf" instead of "curbuf" in syntax_clear(). 相关文件: src/syntax.c Patch 6.3.076 问题: Crash when using cscope and there is a parse error (e.g., line too long). (Alexey I. Froloff) 解决方案: Pass the actual number of matches to cs_manage_matches() and correctly handle the error situation. 相关文件: src/if_cscope.c Patch 6.3.077 (extra) 问题: VMS: First character input after ESC was not recognized. 解决方案: Added TRM$M_TM_TIMED in vms_read(). (Zoltan Arpadffy) 相关文件: src/os_vms.c Patch 6.3.078 (extra, after 6.3.077) 问题: VMS: Performance issue after patch 6.3.077 解决方案: Add a timeout in the itemlist. (Zoltan Arpadffy) 相关文件: src/os_vms.c Patch 6.3.079 问题: Crash when executing a command in the command line window while syntax highlighting is enabled. (Pero Brbora) 解决方案: Don't use a pointer to a buffer that has been deleted. 相关文件: src/syntax.c Patch 6.3.080 (extra) 问题: Win32: With 'encoding' set to utf-8 while the current codepage is Chinese editing a file with some specific characters in the name fails. 解决方案: Use _wfullpath() instead of _fullpath() when necessary. 相关文件: src/os_mswin.c Patch 6.3.081 问题: Unix: glob() may execute a shell command when it's not wanted. (Georgi Guninski) 解决方案: Verify the sandbox flag is not set. 相关文件: src/os_unix.c Patch 6.3.082 (after 6.3.081) 问题: Unix: expand() may execute a shell command when it's not wanted. (Georgi Guninski) 解决方案: A more generic solution than 6.3.081. 相关文件: src/os_unix.c Patch 6.3.083 问题: VMS: The vt320 termcap entry is incomplete. 解决方案: Add missing function keys. (Zoltan Arpadffy) 相关文件: src/term.c Patch 6.3.084 (extra) 问题: Cygwin: compiling with DEBUG doesn't work. Perl path was ignored. Failure when $(OUTDIR) already exists. "po" makefile is missing. 解决方案: Use changes tested in Vim 7. (Tony Mechelynck) 相关文件: src/Make_cyg.mak, src/po/Make_cyg.mak Patch 6.3.085 问题: Crash in syntax highlighting code. (Marc Espie) 解决方案: Prevent current_col going past the end of the line. 相关文件: src/syntax.c Patch 6.3.086 (extra) 问题: Can't produce message translation file with msgfmt that checks printf strings. 解决方案: Fix the Russian translation. 相关文件: src/po/ru.po, src/po/ru.cp1251.po Patch 6.3.087 问题: MS-DOS: Crash. (Jason Hood) 解决方案: Don't call fname_case() with a NULL pointer. 相关文件: src/ex_cmds.c Patch 6.3.088 问题: Editing ".in" causes error E218. (Stefan Karlsson) 解决方案: Require some characters before ".in". Same for ".orig" and others. 相关文件: runtime/filetype.vim Patch 6.3.089 问题: A session file doesn't work when created while the current directory contains a space or the directory of the session files contains a space. (Paolo Giarrusso) 解决方案: Escape spaces with a backslash. 相关文件: src/ex_docmd.c Patch 6.3.090 问题: A very big value for 'columns' or 'lines' may cause a crash. 解决方案: Limit the values to 10000 and 1000. 相关文件: src/option.c Patch 6.4a.001 问题: The Unix Makefile contained too many dependencies and a few uncommented lines. 解决方案: Run "make depend" with manual changes to avoid a gcc incompatibility. Comment a few lines. 相关文件: src/Makefile Patch 6.4b.001 问题: Vim reports "Vim 6.4a" in the ":version" output. 解决方案: Change "a" to "b". (Tony Mechelynck) 相关文件: src/version.h Patch 6.4b.002 问题: In Insert mode, pasting a multibyte character after the end of the line leaves the cursor just before that character. 解决方案: Make sure "gP" leaves the cursor in the right place when 'virtualedit' is set. 相关文件: src/ops.c Patch 6.4b.003 (after 6.4b.002) 问题: The problem still exists when 'encoding' is set to "cp936". 解决方案: Fix the problem in getvvcol(), compute the coladd field correctly. 相关文件: src/charset.c, src/ops.c Patch 6.4b.004 问题: Selecting a {} block with "viB" includes the '}' when there is an empty line before it. 解决方案: Don't advance the cursor to include a line break when it's already at the line break. 相关文件: src/search.c vim:tw=78:ts=8:noet:ft=help:norl: