Hayaki Saito | 26 Jul 06:50 2014
Picon

Look again some past patches for os_unix.c/term.c

Hi lists,

Quite some time ago, I proposed 'ambiwidth' auto-detection. it was introduced by 7.3.859.
https://groups.google.com/d/topic/vim_dev/CuwxGqHMlUQ/discussion

As you know, this feature caused many problems, most of bug reporter said
that vim launches with REPLACE mode.

I wrote a quick fix for this(7.3.863), but it was not proper solution.
https://groups.google.com/d/topic/vim_dev/Mxm3Mw-2QpA/discussion

Patch 7.4.207 was also not a correct solution.
https://groups.google.com/d/topic/vim_dev/uQgBZoPGYxg/discussion
This additionally causes another REPLACE mode problem by another reason
on some terminals such as dvtm/jfbterm, so they have odd glitch of reporting
off-by-one cursor position response. I reproduced that problem on dvtm-0.8.

I think the patch set of 7.4.305, 7.4.307, 7.4.359 should be reverted.
https://groups.google.com/d/topic/vim_dev/BQ3Kr3io1_A/discussion
https://groups.google.com/d/topic/vim_dev/FCz4E3TOKRo/discussion
https://groups.google.com/d/topic/vim_dev/iX6Z7cpXKBw/discussion
They certainly resolve the problem in main case, but it cause a side effect
which disables termresponse in case of ttym=dec/pterm.
In addition, above patches are so complicated. I propose the following solution instead of them.

https://gist.github.com/saitoha/7149d02fb524ac2c1b90#file-correct-termresponse-behavior-with-decmouse-diff-L159
(The hunk  <at>  <at>  -4212,10 +4170,16  <at>  <at>  in src/term.c)

The attached patch considers above matters.
I tested it under many environment including the following terminals
(Continue reading)

Jacob Niehus | 26 Jul 05:01 2014
Picon

[patch] Keep same position in changelist when splitting window

Currently, the change list index gets reset to zero (oldest change) in a new split window, so typing 'g;'
gives an error. I think the index should either get set to the newest change (as if opening a new buffer) or to
the same as the window it's split from. I think the latter is more useful, so I implemented that.

diff --git a/src/window.c b/src/window.c
--- a/src/window.c
+++ b/src/window.c
 <at>  <at>  -1178,6 +1178,11  <at>  <at> 
 	    p_wh = size;
     }

+#ifdef FEAT_JUMPLIST
+    /* Keep same changelist position in new window */
+    wp->w_changelistidx = oldwin->w_changelistidx;
+#endif
+
     /*
      * make the new window the current window
      */

-- 
--

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
(Continue reading)

Jacob Niehus | 25 Jul 21:04 2014
Picon

[patch] getcmdwintype()

I think this is a useful function to allow different mappings depending on the type of command window (ex,
search, input, etc.). I can add documentation if people agree.

-Jake

diff --git a/src/eval.c b/src/eval.c
--- a/src/eval.c
+++ b/src/eval.c
 <at>  <at>  -554,6 +554,7  <at>  <at> 
 static void f_getcmdline __ARGS((typval_T *argvars, typval_T *rettv));
 static void f_getcmdpos __ARGS((typval_T *argvars, typval_T *rettv));
 static void f_getcmdtype __ARGS((typval_T *argvars, typval_T *rettv));
+static void f_getcmdwintype __ARGS((typval_T *argvars, typval_T *rettv));
 static void f_getcwd __ARGS((typval_T *argvars, typval_T *rettv));
 static void f_getfontname __ARGS((typval_T *argvars, typval_T *rettv));
 static void f_getfperm __ARGS((typval_T *argvars, typval_T *rettv));
 <at>  <at>  -7984,6 +7985,7  <at>  <at> 
     {"getcmdline",	0, 0, f_getcmdline},
     {"getcmdpos",	0, 0, f_getcmdpos},
     {"getcmdtype",	0, 0, f_getcmdtype},
+    {"getcmdwintype",	0, 0, f_getcmdwintype},
     {"getcurpos",	0, 0, f_getcurpos},
     {"getcwd",		0, 0, f_getcwd},
     {"getfontname",	0, 1, f_getfontname},
 <at>  <at>  -11503,6 +11505,26  <at>  <at> 
 }

 /*
+ * "getcmdwintype()" function
+ */
(Continue reading)

vim | 25 Jul 17:58 2014

Issue 241 in vim: vim starts in REPLACE mode

Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 241 by DarwinsK... <at> gmail.com: vim starts in REPLACE mode
http://code.google.com/p/vim/issues/detail?id=241

What steps will reproduce the problem?
1. runn vim
  a. built after 7.4.273
  b. on kmscon (TERM=xterm-256color)
  c. with any vimrc file including an empty vimrc (touch vimrc)

What is the expected output?
vim starting in INSERT mode
What do you see instead?
vim starts in REPLACE mode

What version of the product are you using? On what operating system?
see bugrepot.txt

Please provide any additional information below.
also see typescript
it was suggested on irc that this might be related to the following bug:

irc.freenode.#vim.weechatlog:2014-07-24 22:10:05  jamessan  glphvgacs: This  
looks a lot like http://code.google.com/p/vim/issues/detail?id=183 which  
Bram hoped would be fixed by 7.4.207, although it doesn't appear it was.  I  
seem to recall further discussion about that, but haven't found it yet

(Continue reading)

Ingo Karkat | 24 Jul 10:47 2014
Picon

BUG: NFA-regexp discrepancy with \ <at> <= and \1 backreference

Hello Vim developers,

there's yet another discrepancy between the regular expression engines:

for n in [1,2] | echo match('",abc" in "abc,abc"', '\%#=' . n .
'\1\ <at> <=,\([a-z]\+\)') | endfor

I actually found this while checking out an example from the help
(trying to understand why a regexp I use in a plugin didn't work):

,----[ :help /\ <at> <= ]----
| The part of the pattern after "\ <at> <=" and "\ <at> <!" are checked for a
| match first, thus things like "\1" don't work to reference \(\) inside
| the preceding atom.  It does work the other way around:
| Example			matches ~
| \1\ <at> <=,\([a-z]\+\)	",abc" in "abc,abc"
`----

The NFA engine somehow doesn't properly handle the backreference
assertion and finds a match where it shouldn't.

To reproduce, use above scriptlet or the identical attached script:

vim -N -u NONE -S bad-re5.vim
14
1

This is with a huge build of Vim 7.4.383, running in an Ubuntu 13.10 x64
VM.

(Continue reading)

Bram Moolenaar | 23 Jul 21:10 2014
Picon
Picon

Patch 7.4.383


Patch 7.4.383
Problem:    Bad interaction between preview window and omnifunc.
Solution:   Avoid redrawing the status line. (Hirohito Higashi)
Files:	    src/popupmnu.c

*** ../vim-7.4.382/src/popupmnu.c	2014-07-09 19:58:21.111647328 +0200
--- src/popupmnu.c	2014-07-23 20:56:17.131772989 +0200
***************
*** 643,648 ****
--- 643,654 ----

  		    if (curwin != curwin_save && win_valid(curwin_save))
  		    {
+ 			/* When the first completion is done and the preview
+ 			 * window is not resized, skip the preview window's
+ 			 * status line redrawing. */
+ 			if (ins_compl_active() && !resized)
+ 			    curwin->w_redr_status = FALSE;
+ 
  			/* Return cursor to where we were */
  			validate_cursor();
  			redraw_later(SOME_VALID);
*** ../vim-7.4.382/src/version.c	2014-07-23 20:41:09.895779510 +0200
--- src/version.c	2014-07-23 20:58:12.079772163 +0200
***************
*** 736,737 ****
--- 736,739 ----
  {   /* Add new patch number below this line */
+ /**/
(Continue reading)

Bram Moolenaar | 23 Jul 20:41 2014
Picon
Picon

Patch 7.4.382


Patch 7.4.382
Problem:    Mapping characters may not work after typing Esc in Insert mode.
Solution:   Fix the noremap flags for inserted characters. (Jacob Niehus)
Files:	    src/getchar.c

*** ../vim-7.4.381/src/getchar.c	2014-06-25 14:39:35.102348584 +0200
--- src/getchar.c	2014-07-23 20:10:25.651792765 +0200
***************
*** 2731,2736 ****
--- 2731,2741 ----
  		}
  		if (c < 0)
  		    continue;	/* end of input script reached */
+ 
+ 		/* Allow mapping for just typed characters. When we get here c
+ 		 * is the number of extra bytes and typebuf.tb_len is 1. */
+ 		for (n = 1; n <= c; ++n)
+ 		    typebuf.tb_noremap[typebuf.tb_off + n] = RM_YES;
  		typebuf.tb_len += c;

  		/* buffer full, don't map */
*** ../vim-7.4.381/src/version.c	2014-07-23 17:39:21.815857910 +0200
--- src/version.c	2014-07-23 18:26:42.663837492 +0200
***************
*** 736,737 ****
--- 736,739 ----
  {   /* Add new patch number below this line */
+ /**/
+     382,
(Continue reading)

Bram Moolenaar | 23 Jul 17:40 2014
Picon
Picon

Patch 7.4.381


Patch 7.4.381
Problem:    Get u_undo error when backspacing in Insert mode deletes more than
	    one line break. (Ayberk Ozgur)
Solution:   Also decrement Insstart.lnum.
Files:	    src/edit.c

*** ../vim-7.4.380/src/edit.c	2014-07-23 13:50:41.839956521 +0200
--- src/edit.c	2014-07-23 17:35:05.747859751 +0200
***************
*** 8833,8838 ****
--- 8833,8839 ----
  		return FALSE;
  	    --Insstart_orig.lnum;
  	    Insstart_orig.col = MAXCOL;
+ 	    Insstart = Insstart_orig;
  	}
  	/*
  	 * In replace mode:
*** ../vim-7.4.380/src/version.c	2014-07-23 16:56:56.587876204 +0200
--- src/version.c	2014-07-23 17:38:54.467858107 +0200
***************
*** 736,737 ****
--- 736,739 ----
  {   /* Add new patch number below this line */
+ /**/
+     381,
  /**/

--

-- 
(Continue reading)

Bram Moolenaar | 23 Jul 16:57 2014
Picon
Picon

Patch 7.4.380


Patch 7.4.380
Problem:    Loading python may cause Vim to exit.
Solution:   Avoid loading the "site" module. (Taro Muraoka)
Files:	    src/if_python.c

*** ../vim-7.4.379/src/if_python.c	2014-03-30 16:11:37.176530823 +0200
--- src/if_python.c	2014-07-23 16:46:42.863880615 +0200
***************
*** 295,300 ****
--- 295,303 ----
  #  define PyCObject_FromVoidPtr dll_PyCObject_FromVoidPtr
  #  define PyCObject_AsVoidPtr dll_PyCObject_AsVoidPtr
  # endif
+ # if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02070000
+ #  define Py_NoSiteFlag (*dll_Py_NoSiteFlag)
+ # endif

  /*
   * Pointers for dynamic link
***************
*** 440,445 ****
--- 443,451 ----
  static PyObject* (*dll_PyCObject_FromVoidPtr)(void *cobj, void (*destr)(void *));
  static void* (*dll_PyCObject_AsVoidPtr)(PyObject *);
  # endif
+ # if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02070000
+ static int* dll_Py_NoSiteFlag;
+ # endif

(Continue reading)

Bram Moolenaar | 23 Jul 16:33 2014
Picon
Picon

Patch 7.4.379


Patch 7.4.379
Problem:    Accessing freed memory after using setqflist(list, 'r'). (Lcd)
Solution:   Reset qf_index.
Files:	    src/quickfix.c

*** ../vim-7.4.378/src/quickfix.c	2014-07-23 15:54:43.443903036 +0200
--- src/quickfix.c	2014-07-23 16:11:59.915895586 +0200
***************
*** 2173,2178 ****
--- 2173,2179 ----
      }
      vim_free(qi->qf_lists[idx].qf_title);
      qi->qf_lists[idx].qf_title = NULL;
+     qi->qf_lists[idx].qf_index = 0;
  }

  /*
*** ../vim-7.4.378/src/version.c	2014-07-23 15:54:43.443903036 +0200
--- src/version.c	2014-07-23 16:14:43.995894407 +0200
***************
*** 736,737 ****
--- 736,739 ----
  {   /* Add new patch number below this line */
+ /**/
+     379,
  /**/

--

-- 
"Lisp has all the visual appeal of oatmeal with nail clippings thrown in."
(Continue reading)

Bram Moolenaar | 23 Jul 15:55 2014
Picon
Picon

Patch 7.4.378


Patch 7.4.378
Problem:    Title of quickfist list is not kept for setqflist(list, 'r').
Solution:   Keep the title.  Add a test. (Lcd)
Files:	    src/quickfix.c, src/testdir/Make_amiga.mak,
	    src/testdir/Make_dos.mak, src/testdir/Make_ming.mak,
	    src/testdir/Make_os2.mak, src/testdir/Make_vms.mms,
	    src/testdir/Makefile, src/testdir/test_qf_title.in,
	    src/testdir/test_qf_title.ok

*** ../vim-7.4.377/src/quickfix.c	2014-03-27 17:02:22.080660944 +0100
--- src/quickfix.c	2014-07-23 15:37:30.551910459 +0200
***************
*** 107,112 ****
--- 107,113 ----
  };

  static int	qf_init_ext __ARGS((qf_info_T *qi, char_u *efile, buf_T *buf, typval_T *tv, char_u
*errorformat, int newlist, linenr_T lnumfirst, linenr_T lnumlast, char_u *qf_title));
+ static void	qf_store_title __ARGS((qf_info_T *qi, char_u *title));
  static void	qf_new_list __ARGS((qf_info_T *qi, char_u *qf_title));
  static void	ll_free_all __ARGS((qf_info_T **pqi));
  static int	qf_add_entry __ARGS((qf_info_T *qi, qfline_T **prevp, char_u *dir, char_u *fname, int
bufnum, char_u *mesg, long lnum, int col, int vis_col, char_u *pattern, int nr, int type, int valid));
***************
*** 126,132 ****
  static win_T	*qf_find_win __ARGS((qf_info_T *qi));
  static buf_T	*qf_find_buf __ARGS((qf_info_T *qi));
  static void	qf_update_buffer __ARGS((qf_info_T *qi));
! static void	qf_set_title __ARGS((qf_info_T *qi));
(Continue reading)


Gmane