- patchlevel 35

This commit is contained in:
Karsten Hopp 2006-06-27 09:24:46 +00:00
parent d80376bba4
commit f063954620
3 changed files with 252 additions and 2 deletions

205
7.0.035 Normal file
View File

@ -0,0 +1,205 @@
To: vim-dev@vim.org
Subject: Patch 7.0.035
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
------------
Patch 7.0.035
Problem: Insert mode completion works when typed but not when replayed from
a register. (Hari Krishna Dara)
Also: Mappings for Insert mode completion don't always work.
Solution: When finding a non-completion key in the input don't interrupt
completion when it wasn't typed.
Do use mappings when checking for typeahead while still finding
completions. Avoids that completion is interrupted too soon.
Use "compl_pending" in a different way.
Files: src/edit.c
*** ../vim-7.0.034/src/edit.c Fri Jun 23 17:59:26 2006
--- src/edit.c Fri Jun 23 21:32:42 2006
***************
*** 4166,4173 ****
{
if (compl_shows_dir == FORWARD && compl_shown_match->cp_next != NULL)
{
- if (compl_pending != 0)
- --compl_pending;
compl_shown_match = compl_shown_match->cp_next;
found_end = (compl_first_match != NULL
&& (compl_shown_match->cp_next == compl_first_match
--- 4166,4171 ----
***************
*** 4176,4189 ****
else if (compl_shows_dir == BACKWARD
&& compl_shown_match->cp_prev != NULL)
{
- if (compl_pending != 0)
- ++compl_pending;
found_end = (compl_shown_match == compl_first_match);
compl_shown_match = compl_shown_match->cp_prev;
found_end |= (compl_shown_match == compl_first_match);
}
else
{
if (advance)
{
if (compl_shows_dir == BACKWARD)
--- 4174,4197 ----
else if (compl_shows_dir == BACKWARD
&& compl_shown_match->cp_prev != NULL)
{
found_end = (compl_shown_match == compl_first_match);
compl_shown_match = compl_shown_match->cp_prev;
found_end |= (compl_shown_match == compl_first_match);
}
else
{
+ if (!allow_get_expansion)
+ {
+ if (advance)
+ {
+ if (compl_shows_dir == BACKWARD)
+ compl_pending -= todo + 1;
+ else
+ compl_pending += todo + 1;
+ }
+ return -1;
+ }
+
if (advance)
{
if (compl_shows_dir == BACKWARD)
***************
*** 4191,4204 ****
else
++compl_pending;
}
- if (!allow_get_expansion)
- return -1;
/* Find matches. */
num_matches = ins_compl_get_exp(&compl_startpos);
! if (compl_pending != 0 && compl_direction == compl_shows_dir
&& advance)
! compl_shown_match = compl_curr_match;
found_end = FALSE;
}
if ((compl_shown_match->cp_flags & ORIGINAL_TEXT) == 0
--- 4199,4225 ----
else
++compl_pending;
}
/* Find matches. */
num_matches = ins_compl_get_exp(&compl_startpos);
!
! /* handle any pending completions */
! while (compl_pending != 0 && compl_direction == compl_shows_dir
&& advance)
! {
! if (compl_pending > 0 && compl_shown_match->cp_next != NULL)
! {
! compl_shown_match = compl_shown_match->cp_next;
! --compl_pending;
! }
! if (compl_pending < 0 && compl_shown_match->cp_prev != NULL)
! {
! compl_shown_match = compl_shown_match->cp_prev;
! ++compl_pending;
! }
! else
! break;
! }
found_end = FALSE;
}
if ((compl_shown_match->cp_flags & ORIGINAL_TEXT) == 0
***************
*** 4307,4315 ****
return;
count = 0;
! ++no_mapping;
c = vpeekc_any();
- --no_mapping;
if (c != NUL)
{
if (vim_is_ctrl_x_key(c) && c != Ctrl_X && c != Ctrl_R)
--- 4328,4336 ----
return;
count = 0;
! /* Check for a typed key. Do use mappings, otherwise vim_is_ctrl_x_key()
! * can't do its work correctly. */
c = vpeekc_any();
if (c != NUL)
{
if (vim_is_ctrl_x_key(c) && c != Ctrl_X && c != Ctrl_R)
***************
*** 4319,4330 ****
(void)ins_compl_next(FALSE, ins_compl_key2count(c),
c != K_UP && c != K_DOWN);
}
! else if (c != Ctrl_R)
! compl_interrupted = TRUE;
}
if (compl_pending != 0 && !got_int)
! (void)ins_compl_next(FALSE, compl_pending > 0
! ? compl_pending : -compl_pending, TRUE);
}
/*
--- 4340,4366 ----
(void)ins_compl_next(FALSE, ins_compl_key2count(c),
c != K_UP && c != K_DOWN);
}
! else
! {
! /* Need to get the character to have KeyTyped set. We'll put it
! * back with vungetc() below. */
! c = safe_vgetc();
!
! /* Don't interrupt completion when the character wasn't typed,
! * e.g., when doing @q to replay keys. */
! if (c != Ctrl_R && KeyTyped)
! compl_interrupted = TRUE;
!
! vungetc(c);
! }
}
if (compl_pending != 0 && !got_int)
! {
! int todo = compl_pending > 0 ? compl_pending : -compl_pending;
!
! compl_pending = 0;
! (void)ins_compl_next(FALSE, todo, TRUE);
! }
}
/*
*** ../vim-7.0.034/src/version.c Fri Jun 23 17:59:26 2006
--- src/version.c Fri Jun 23 21:35:39 2006
***************
*** 668,669 ****
--- 668,671 ----
{ /* Add new patch number below this line */
+ /**/
+ 35,
/**/
--
So when I saw the post to comp.editors, I rushed over to the FTP site to
grab it. So I yank apart the tarball, light x candles, where x= the
vim version multiplied by the md5sum of the source divided by the MAC of
my NIC (8A3FA78155A8A1D346C3C4A), put on black robes, dim the lights,
wave a dead chicken over the hard drive, and summon the power of GNU GCC
with the magic words "make config ; make!".
[Jason Spence, compiling Vim 5.0]
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

View File

@ -47,3 +47,16 @@ Individual patches for Vim 7.0:
1470 7.0.020 GUI: crash when using 'mousefocus'
4240 7.0.021 crash when using "\\[" and "\\]" in 'errorformat
5471 7.0.022 Ruby: buffer.append() could append to the wrong buffer
5351 7.0.023 crash after Insert mode completion without matches
1619 7.0.024 it is possible to set arbitrary v: variables
2606 7.0.025 crash when deleting an item from a:000
1800 7.0.026 Unix: when using libcall() and old error may be shown
1344 7.0.027 (extra) Win32: hang on exit when compiled with SNiFF+
3014 7.0.028 (extra) OS/2: compilation problem
1494 7.0.029 cursor position may be wrong when using getchar()
1664 7.0.030 the ":compiler" command can't be used in a FileChangedRO event
1808 7.0.031 after deleting a buffer its Select mode mappings remain
1424 7.0.032 (extra, after 7.0.027) missing semicolon
2431 7.0.033 pasting after autoindent removes the indent
2042 7.0.034 repeating completion was wrong after typing text or using BS
5905 7.0.035 repeating Insert mode completion doesn't work properly

View File

@ -24,12 +24,12 @@
#used for pre-releases:
%define beta %{nil}
%define vimdir vim70%{?beta}
%define patchlevel 022
%define patchlevel 035
Summary: The VIM editor.
Name: vim
Version: %{baseversion}.%{beta}%{patchlevel}
Release: 2
Release: 1
License: freeware
Group: Applications/Editors
Source0: ftp://ftp.vim.org/pub/vim/unix/vim-%{baseversion}%{?beta}%{?CVSDATE}.tar.bz2
@ -76,6 +76,19 @@ Patch019: ftp://ftp.vim.org/pub/vim/patches/7.0/7.0.019
Patch020: ftp://ftp.vim.org/pub/vim/patches/7.0/7.0.020
Patch021: ftp://ftp.vim.org/pub/vim/patches/7.0/7.0.021
Patch022: ftp://ftp.vim.org/pub/vim/patches/7.0/7.0.022
Patch023: ftp://ftp.vim.org/pub/vim/patches/7.0/7.0.023
Patch024: ftp://ftp.vim.org/pub/vim/patches/7.0/7.0.024
Patch025: ftp://ftp.vim.org/pub/vim/patches/7.0/7.0.025
Patch026: ftp://ftp.vim.org/pub/vim/patches/7.0/7.0.026
Patch027: ftp://ftp.vim.org/pub/vim/patches/7.0/7.0.027
Patch028: ftp://ftp.vim.org/pub/vim/patches/7.0/7.0.028
Patch029: ftp://ftp.vim.org/pub/vim/patches/7.0/7.0.029
Patch030: ftp://ftp.vim.org/pub/vim/patches/7.0/7.0.030
Patch031: ftp://ftp.vim.org/pub/vim/patches/7.0/7.0.031
Patch032: ftp://ftp.vim.org/pub/vim/patches/7.0/7.0.032
Patch033: ftp://ftp.vim.org/pub/vim/patches/7.0/7.0.033
Patch034: ftp://ftp.vim.org/pub/vim/patches/7.0/7.0.034
Patch035: ftp://ftp.vim.org/pub/vim/patches/7.0/7.0.035
Patch3000: vim-7.0-syntax.patch
@ -229,6 +242,22 @@ perl -pi -e "s,bin/nawk,bin/awk,g" runtime/tools/mve.awk
%patch020 -p0
%patch021 -p0
%patch022 -p0
%patch023 -p0
%patch024 -p0
%patch025 -p0
%patch026 -p0
# Win32
#patch027 -p0
# OS/2
#patch028 -p0
%patch029 -p0
%patch030 -p0
%patch031 -p0
# Win32
#patch032 -p0
%patch033 -p0
%patch034 -p0
%patch035 -p0
%patch3000 -p1
%patch3001 -p1
@ -565,6 +594,9 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/icons/hicolor/*/apps/*
%changelog
* Tue Jun 27 2006 Karsten Hopp <karsten@redhat.de> 7.0.035-1
- patchlevel 35
* Wed Jun 21 2006 Karsten Hopp <karsten@redhat.de> 7.0.022-2
- add binfmt_misc rpc_pipefs to fstypes for better mtab highlighting