diff --git a/ChangeLog b/ChangeLog
index ae3ff1f3d0e3fc65aa4fbfbe4806565faf680622..36fd038e02e1c184a7b87e9ee814f990e8b0b30a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,10 @@
-2009-12-07 David Lawrence Ramsey <pooka109@gmail.com>
+2009-12-12 Chris Allegretta <chrisa@asty.org>
+	* text.c (do_delete), nano.c (do_output): Add check for length of current line 
+	  before and after adding/deleting text, and do full refresh if it is now
+	  a different multiple of COLS.  Also get rid of superfluous do_refresh
+	  vars now that we have edit_refresh_needed.
+
+2009-12-09 David Lawrence Ramsey <pooka109@gmail.com>
 	* global.c (shortcut_init), browser.c (do_browser): Fix M-W not being bound to 
 	  research in either main menu or browser.
 
diff --git a/src/nano.c b/src/nano.c
index 8e5d60ce3ab26d16a8d36f3a709049980f51291c..d6a21d107fe69bf5082dadd695ca4fd238b3f83d 100644
--- a/src/nano.c
+++ b/src/nano.c
@@ -1893,17 +1893,15 @@ precalc_cleanup:
  * TRUE. */
 void do_output(char *output, size_t output_len, bool allow_cntrls)
 {
-    size_t current_len, i = 0;
-    bool do_refresh = FALSE;
-	/* Do we have to call edit_refresh(), or can we get away with
-	 * just update_line()? */
-
+    size_t current_len, orig_lenpt, i = 0;
     char *char_buf = charalloc(mb_cur_max());
     int char_buf_len;
 
     assert(openfile->current != NULL && openfile->current->data != NULL);
 
     current_len = strlen(openfile->current->data);
+    if (ISSET(SOFTWRAP))
+	orig_lenpt = strlenpt(openfile->current->data);
 
     while (i < output_len) {
 	/* If allow_cntrls is TRUE, convert nulls and newlines
@@ -1967,26 +1965,25 @@ void do_output(char *output, size_t output_len, bool allow_cntrls)
 
 #ifndef DISABLE_WRAPPING
 	/* If we're wrapping text, we need to call edit_refresh(). */
-	if (!ISSET(NO_WRAP)) {
-	    bool do_refresh_save = do_refresh;
-
-	    do_refresh = do_wrap(openfile->current, FALSE);
-
-	    /* If we needed to call edit_refresh() before this, we'll
-	     * still need to after this. */
-	    if (do_refresh_save)
-		do_refresh = TRUE;
-	}
+	if (!ISSET(NO_WRAP))
+	    if (do_wrap(openfile->current, FALSE))
+		edit_refresh_needed = TRUE;
 #endif
 
 #ifdef ENABLE_COLOR
 	/* If color syntaxes are available and turned on, we need to
 	 * call edit_refresh(). */
 	if (openfile->colorstrings != NULL && !ISSET(NO_COLOR_SYNTAX))
-	    do_refresh = TRUE;
+	    edit_refresh_needed = TRUE;
 #endif
     }
 
+    /* Well we might also need a full refresh if we've changed the 
+       line length to be a new multiple of COLS */
+    if (ISSET(SOFTWRAP) && edit_refresh_needed == FALSE)
+	if (strlenpt(openfile->current->data) / COLS  != orig_lenpt / COLS)
+	    edit_refresh_needed = TRUE;
+
     free(char_buf);
 
     openfile->placewewant = xplustabs();
@@ -1995,7 +1992,7 @@ void do_output(char *output, size_t output_len, bool allow_cntrls)
 #ifdef ENABLE_COLOR
     reset_multis(openfile->current, FALSE);
 #endif
-    if (do_refresh) {
+    if (edit_refresh_needed == TRUE) {
 	edit_refresh();
 	edit_refresh_needed = FALSE;
     } else
diff --git a/src/text.c b/src/text.c
index 1d657d581fbffb62029e6dbde12ecff07e15da9e..38b9338cc0357ba2d10d450a175cd3fdc90de2c2 100644
--- a/src/text.c
+++ b/src/text.c
@@ -66,9 +66,7 @@ void do_mark(void)
 /* Delete the character under the cursor. */
 void do_delete(void)
 {
-    bool do_refresh = FALSE;
-	/* Do we have to call edit_refresh(), or can we get away with
-	 * just update_line()? */
+    size_t orig_lenpt = 0;
 
 #ifndef NANO_TINY
     update_undo(DEL);
@@ -86,6 +84,9 @@ void do_delete(void)
 
 	assert(openfile->current_x < strlen(openfile->current->data));
 
+	if (ISSET(SOFTWRAP))
+	    orig_lenpt = strlenpt(openfile->current->data);
+
 	/* Let's get dangerous. */
 	charmove(&openfile->current->data[openfile->current_x],
 		&openfile->current->data[openfile->current_x +
@@ -108,7 +109,7 @@ void do_delete(void)
 	/* If we're deleting at the end of a line, we need to call
 	 * edit_refresh(). */
 	if (openfile->current->data[openfile->current_x] == '\0')
-	    do_refresh = TRUE;
+	    edit_refresh_needed = TRUE;
 
 	openfile->current->data = charealloc(openfile->current->data,
 		openfile->current_x + strlen(foo->data) + 1);
@@ -138,11 +139,13 @@ void do_delete(void)
     } else
 	return;
 
+    if (ISSET(SOFTWRAP) && edit_refresh_needed == FALSE)
+	if (strlenpt(openfile->current->data) / COLS != orig_lenpt / COLS)
+	    edit_refresh_needed  = TRUE;
+
     set_modified();
 
-    if (do_refresh)
-	edit_refresh_needed = TRUE;
-    else
+    if (edit_refresh_needed  == FALSE)
 	update_line(openfile->current, openfile->current_x);
 }