Compare commits

..

4 Commits

Author SHA1 Message Date
Bram Moolenaar
725a962194 updated for version 7.3.335
Problem:    When 'imdisable' is reset from an autocommand in Insert mode it
            doesn't take effect.
Solution:   Call im_set_active() in Insert mode. (Taro Muraoka)
2011-10-12 16:57:13 +02:00
Bram Moolenaar
08c51aabc4 updated for version 7.3.334
Problem:    Latest MingW about XSUBPP referencing itself. (Gongqian Li)
Solution:   Rename the first use to XSUBPPTRY.
2011-10-12 14:11:45 +02:00
Bram Moolenaar
ca0c9fcda0 updated for version 7.3.333
Problem:    Using "." to repeat a Visual delete counts the size in bytes, not
            characters.  (Connor Lane Smith)
Solution:   Store the virtual column numbers instead of byte positions.
2011-10-04 21:22:44 +02:00
Bram Moolenaar
e79d1535cf updated for version 7.3.332
Problem:    Indent after "public:" is not increased in C++ code. (Lech Lorens)
Solution:   Check for namespace after the regular checks. (partly by Martin
            Gieseking)
2011-10-04 18:03:47 +02:00
7 changed files with 137 additions and 71 deletions

View File

@@ -108,10 +108,10 @@ endif
# on NT, it's here:
PERLLIB=$(PERL)/lib
PERLLIBS=$(PERLLIB)/Core
XSUBPP=$(PERLLIB)/ExtUtils/xsubpp
XSUBPP_EXISTS=$(shell perl -e "print 1 unless -e '$(XSUBPP)'")
XSUBPPTRY=$(PERLLIB)/ExtUtils/xsubpp
XSUBPP_EXISTS=$(shell perl -e "print 1 unless -e '$(XSUBPPTRY)'")
ifeq "$(XSUBPP_EXISTS)" ""
XSUBPP=perl $(XSUBPP)
XSUBPP=perl $(XSUBPPTRY)
else
XSUBPP=xsubpp
endif

View File

@@ -6389,6 +6389,7 @@ get_c_indent()
int lookfor_cpp_namespace = FALSE;
int cont_amount = 0; /* amount for continuation line */
int original_line_islabel;
int added_to_amount = 0;
for (options = curbuf->b_p_cino; *options; )
{
@@ -7216,52 +7217,59 @@ get_c_indent()
else
amount += ind_continuation;
}
else if (lookfor_cpp_namespace)
else
{
if (curwin->w_cursor.lnum == ourscope)
continue;
if (curwin->w_cursor.lnum == 0
|| curwin->w_cursor.lnum
< ourscope - FIND_NAMESPACE_LIM)
break;
l = ml_get_curline();
/*
* If we're in a comment now, skip to the start of the
* comment.
*/
trypos = find_start_comment(ind_maxcomment);
if (trypos != NULL)
{
curwin->w_cursor.lnum = trypos->lnum + 1;
curwin->w_cursor.col = 0;
continue;
}
/*
* Skip preprocessor directives and blank lines.
*/
if (cin_ispreproc_cont(&l, &curwin->w_cursor.lnum))
continue;
if (cin_is_cpp_namespace(l))
{
amount += ind_cpp_namespace;
break;
}
if (cin_nocode(l))
continue;
}
else if (lookfor != LOOKFOR_TERM
if (lookfor != LOOKFOR_TERM
&& lookfor != LOOKFOR_CPP_BASECLASS)
{
amount = scope_amount;
if (theline[0] == '{')
amount += ind_open_extra;
{
amount = scope_amount;
if (theline[0] == '{')
{
amount += ind_open_extra;
added_to_amount = ind_open_extra;
}
}
if (lookfor_cpp_namespace)
{
/*
* Looking for C++ namespace, need to look further
* back.
*/
if (curwin->w_cursor.lnum == ourscope)
continue;
if (curwin->w_cursor.lnum == 0
|| curwin->w_cursor.lnum
< ourscope - FIND_NAMESPACE_LIM)
break;
l = ml_get_curline();
/* If we're in a comment now, skip to the start of
* the comment. */
trypos = find_start_comment(ind_maxcomment);
if (trypos != NULL)
{
curwin->w_cursor.lnum = trypos->lnum + 1;
curwin->w_cursor.col = 0;
continue;
}
/* Skip preprocessor directives and blank lines. */
if (cin_ispreproc_cont(&l, &curwin->w_cursor.lnum))
continue;
/* Finally the actual check for "namespace". */
if (cin_is_cpp_namespace(l))
{
amount += ind_cpp_namespace - added_to_amount;
break;
}
if (cin_nocode(l))
continue;
}
}
break;
}

View File

@@ -20,7 +20,7 @@
*/
static int resel_VIsual_mode = NUL; /* 'v', 'V', or Ctrl-V */
static linenr_T resel_VIsual_line_count; /* number of lines */
static colnr_T resel_VIsual_col; /* nr of cols or end col */
static colnr_T resel_VIsual_vcol; /* nr of cols or end col */
static int restart_VIsual_select = 0;
#endif
@@ -1436,7 +1436,7 @@ do_pending_operator(cap, old_col, gui_yank)
/* The visual area is remembered for redo */
static int redo_VIsual_mode = NUL; /* 'v', 'V', or Ctrl-V */
static linenr_T redo_VIsual_line_count; /* number of lines */
static colnr_T redo_VIsual_col; /* number of cols or end column */
static colnr_T redo_VIsual_vcol; /* number of cols or end column */
static long redo_VIsual_count; /* count for Visual operator */
# ifdef FEAT_VIRTUALEDIT
int include_line_break = FALSE;
@@ -1549,22 +1549,31 @@ do_pending_operator(cap, old_col, gui_yank)
#ifdef FEAT_VISUAL
if (redo_VIsual_busy)
{
/* Redo of an operation on a Visual area. Use the same size from
* redo_VIsual_line_count and redo_VIsual_vcol. */
oap->start = curwin->w_cursor;
curwin->w_cursor.lnum += redo_VIsual_line_count - 1;
if (curwin->w_cursor.lnum > curbuf->b_ml.ml_line_count)
curwin->w_cursor.lnum = curbuf->b_ml.ml_line_count;
VIsual_mode = redo_VIsual_mode;
if (VIsual_mode == 'v')
if (redo_VIsual_vcol == MAXCOL || VIsual_mode == 'v')
{
if (redo_VIsual_line_count <= 1)
curwin->w_cursor.col += redo_VIsual_col - 1;
if (VIsual_mode == 'v')
{
if (redo_VIsual_line_count <= 1)
{
validate_virtcol();
curwin->w_curswant =
curwin->w_virtcol + redo_VIsual_vcol - 1;
}
else
curwin->w_curswant = redo_VIsual_vcol;
}
else
curwin->w_cursor.col = redo_VIsual_col;
}
if (redo_VIsual_col == MAXCOL)
{
curwin->w_curswant = MAXCOL;
coladvance((colnr_T)MAXCOL);
{
curwin->w_curswant = MAXCOL;
}
coladvance(curwin->w_curswant);
}
cap->count0 = redo_VIsual_count;
if (redo_VIsual_count != 0)
@@ -1710,7 +1719,7 @@ do_pending_operator(cap, old_col, gui_yank)
}
}
else if (redo_VIsual_busy)
oap->end_vcol = oap->start_vcol + redo_VIsual_col - 1;
oap->end_vcol = oap->start_vcol + redo_VIsual_vcol - 1;
/*
* Correct oap->end.col and oap->start.col to be the
* upper-left and lower-right corner of the block area.
@@ -1735,13 +1744,22 @@ do_pending_operator(cap, old_col, gui_yank)
*/
resel_VIsual_mode = VIsual_mode;
if (curwin->w_curswant == MAXCOL)
resel_VIsual_col = MAXCOL;
else if (VIsual_mode == Ctrl_V)
resel_VIsual_col = oap->end_vcol - oap->start_vcol + 1;
else if (oap->line_count > 1)
resel_VIsual_col = oap->end.col;
resel_VIsual_vcol = MAXCOL;
else
resel_VIsual_col = oap->end.col - oap->start.col + 1;
{
if (VIsual_mode != Ctrl_V)
getvvcol(curwin, &(oap->end),
NULL, NULL, &oap->end_vcol);
if (VIsual_mode == Ctrl_V || oap->line_count <= 1)
{
if (VIsual_mode != Ctrl_V)
getvvcol(curwin, &(oap->start),
&oap->start_vcol, NULL, NULL);
resel_VIsual_vcol = oap->end_vcol - oap->start_vcol + 1;
}
else
resel_VIsual_vcol = oap->end_vcol;
}
resel_VIsual_line_count = oap->line_count;
}
@@ -1769,7 +1787,7 @@ do_pending_operator(cap, old_col, gui_yank)
if (!redo_VIsual_busy)
{
redo_VIsual_mode = resel_VIsual_mode;
redo_VIsual_col = resel_VIsual_col;
redo_VIsual_vcol = resel_VIsual_vcol;
redo_VIsual_line_count = resel_VIsual_line_count;
redo_VIsual_count = cap->count0;
}
@@ -7631,12 +7649,16 @@ nv_visual(cap)
if (VIsual_mode == 'v')
{
if (resel_VIsual_line_count <= 1)
curwin->w_cursor.col += resel_VIsual_col * cap->count0 - 1;
{
validate_virtcol();
curwin->w_curswant = curwin->w_virtcol
+ resel_VIsual_vcol * cap->count0 - 1;
}
else
curwin->w_cursor.col = resel_VIsual_col;
check_cursor_col();
curwin->w_curswant = resel_VIsual_vcol;
coladvance(curwin->w_curswant);
}
if (resel_VIsual_col == MAXCOL)
if (resel_VIsual_vcol == MAXCOL)
{
curwin->w_curswant = MAXCOL;
coladvance((colnr_T)MAXCOL);
@@ -7645,7 +7667,7 @@ nv_visual(cap)
{
validate_virtcol();
curwin->w_curswant = curwin->w_virtcol
+ resel_VIsual_col * cap->count0 - 1;
+ resel_VIsual_vcol * cap->count0 - 1;
coladvance(curwin->w_curswant);
}
else

View File

@@ -7806,6 +7806,10 @@ set_bool_option(opt_idx, varp, value, opt_flags)
/* Only de-activate it here, it will be enabled when changing mode. */
if (p_imdisable)
im_set_active(FALSE);
else if (State & INSERT)
/* When the option is set from an autocommand, it may need to take
* effect right away. */
im_set_active(curbuf->b_p_iminsert == B_IMODE_IM);
}
#endif

View File

@@ -1308,6 +1308,20 @@ protected:
int Test() { return FALSE; }
public: // comment
void testfall();
protected:
void testfall();
};
STARTTEST
:set cino=(0,gs,hs
2kdd]]=][
ENDTEST
class Foo : public Bar
{
public:
virtual void method1(void) = 0;
virtual void method2(int arg1,
int arg2,
int arg3) = 0;

View File

@@ -1190,6 +1190,16 @@ protected:
};
class Foo : public Bar
{
public:
virtual void method1(void) = 0;
virtual void method2(int arg1,
int arg2,
int arg3) = 0;
};
void
foo()
{

View File

@@ -709,6 +709,14 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
335,
/**/
334,
/**/
333,
/**/
332,
/**/
331,
/**/