Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
Checking mergeability… Don't worry, you can still create the pull request.
  • 4 commits
  • 4 files changed
  • 0 commit comments
  • 1 contributor
Commits on Feb 16, 2013
Bram Moolenaar updated for version 7.3.821
Problem:    Build with OLE and Cygwin is broken. (Steve Hall)
Solution:   Select static or shared stdc library. (Ken Takta)
766621e
Bram Moolenaar Added tag v7-3-821 for changeset 4936ee89b4bc edc53b9
Commits on Feb 17, 2013
Bram Moolenaar updated for version 7.3.822
Problem:    Crash when accessing freed buffer.
Solution:   Get 'textwidth' in caller of enter_buffer(). (Christian Brabandt)
83f922f
Bram Moolenaar Added tag v7-3-822 for changeset 2f7883063b19 ab2a4e0
Showing with 46 additions and 8 deletions.
  1. +2 −0  .hgtags
  2. +13 −1 src/Make_cyg.mak
  3. +27 −7 src/buffer.c
  4. +4 −0 src/version.c
View
2  .hgtags
@@ -2157,3 +2157,5 @@ d5b1d6177b374bbecfbd5c75fbce28e148eeecea v7-3-814
ad7b6062a7f4041b736d45c5f045671d60eb782f v7-3-818
36fd800b8c6c527c75bfe285d0ed0c3bc1cf45f7 v7-3-819
688da4d486a019afa3565ffc553af6ee1a4e67d8 v7-3-820
+4936ee89b4bcfaa33f74114bd07f20af382af14d v7-3-821
+2f7883063b19039840a4a73fa227f6f42b9e3281 v7-3-822
View
14 src/Make_cyg.mak
@@ -106,6 +106,13 @@ ifndef OPTIMIZE
OPTIMIZE = MAXSPEED
endif
+
+# Link against the shared version of libstdc++ by default. Set
+# STATIC_STDCPLUS to "yes" to link against static version instead.
+ifndef STATIC_STDCPLUS
+STATIC_STDCPLUS=no
+endif
+
### See feature.h for a list of optionals.
### Any other defines can be included here.
@@ -478,7 +485,12 @@ endif
ifeq (yes, $(OLE))
DEFINES += -DFEAT_OLE
EXTRA_OBJS += $(OUTDIR)/if_ole.o
-EXTRA_LIBS += -loleaut32 -lstdc++
+EXTRA_LIBS += -loleaut32
+ifeq (yes, $(STATIC_STDCPLUS))
+EXTRA_LIBS += -Wl,-Bstatic -lstdc++ -lsupc++ -Wl,-Bdynamic
+else
+EXTRA_LIBS += -lstdc++
+endif
endif
##############################
View
34 src/buffer.c
@@ -82,6 +82,9 @@ open_buffer(read_stdin, eap, flags)
#ifdef FEAT_AUTOCMD
buf_T *old_curbuf;
#endif
+#ifdef FEAT_SYN_HL
+ long old_tw = curbuf->b_p_tw;
+#endif
/*
* The 'readonly' flag is only set when BF_NEVERLOADED is being reset.
@@ -113,6 +116,10 @@ open_buffer(read_stdin, eap, flags)
}
EMSG(_("E83: Cannot allocate buffer, using other one..."));
enter_buffer(curbuf);
+#ifdef FEAT_SYN_HL
+ if (old_tw != curbuf->b_p_tw)
+ check_colorcolumn(curwin);
+#endif
return FAIL;
}
@@ -786,6 +793,9 @@ handle_swap_exists(old_curbuf)
# if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
cleanup_T cs;
# endif
+#ifdef FEAT_SYN_HL
+ long old_tw = curbuf->b_p_tw;
+#endif
if (swap_exists_action == SEA_QUIT)
{
@@ -804,7 +814,13 @@ handle_swap_exists(old_curbuf)
if (!buf_valid(old_curbuf) || old_curbuf == curbuf)
old_curbuf = buflist_new(NULL, NULL, 1L, BLN_CURBUF | BLN_LISTED);
if (old_curbuf != NULL)
+ {
enter_buffer(old_curbuf);
+#ifdef FEAT_SYN_HL
+ if (old_tw != curbuf->b_p_tw)
+ check_colorcolumn(curwin);
+#endif
+ }
/* If "old_curbuf" is NULL we are in big trouble here... */
# if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL)
@@ -1364,6 +1380,9 @@ set_curbuf(buf, action)
buf_T *prevbuf;
int unload = (action == DOBUF_UNLOAD || action == DOBUF_DEL
|| action == DOBUF_WIPE);
+#ifdef FEAT_SYN_HL
+ long old_tw = curbuf->b_p_tw;
+#endif
setpcmark();
if (!cmdmod.keepalt)
@@ -1430,21 +1449,24 @@ set_curbuf(buf, action)
# endif
)
#endif
+ {
enter_buffer(buf);
+#ifdef FEAT_SYN_HL
+ if (old_tw != curbuf->b_p_tw)
+ check_colorcolumn(curwin);
+#endif
+ }
}
/*
* Enter a new current buffer.
- * Old curbuf must have been abandoned already!
+ * Old curbuf must have been abandoned already! This also means "curbuf" may
+ * be pointing to freed memory.
*/
void
enter_buffer(buf)
buf_T *buf;
{
-#ifdef FEAT_SYN_HL
- long old_tw = curbuf->b_p_tw;
-#endif
-
/* Copy buffer and window local option values. Not for a help buffer. */
buf_copy_options(buf, BCO_ENTER | BCO_NOHELP);
if (!buf->b_help)
@@ -1468,8 +1490,6 @@ enter_buffer(buf)
#ifdef FEAT_SYN_HL
curwin->w_s = &(buf->b_s);
- if (old_tw != buf->b_p_tw)
- check_colorcolumn(curwin);
#endif
/* Cursor on first line by default. */
View
4 src/version.c
@@ -726,6 +726,10 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 822,
+/**/
+ 821,
+/**/
820,
/**/
819,

No commit comments for this range

Something went wrong with that request. Please try again.