changeset: 6637:e369be9d490b
user: Kevin McCarthy <[email protected]>
date: Fri Apr 29 18:00:10 2016 -0700
link: http://dev.mutt.org/hg/mutt/rev/e369be9d490b
Remove newline insertion from pager. (closes #3835)
The window patches commited now manually move to the next line, so
there is no need to insert newlines for that purpose.
The newlines also goof windows placed to the right of the pager, as is
the case for the (currently external) sidebar-on-the-right
functionality.
Thanks to Richard Russon for the original patch and help testing the
revised patch.
diffs (33 lines):
diff -r efa6f7910c94 -r e369be9d490b pager.c
--- a/pager.c Wed Apr 27 17:56:59 2016 -0700
+++ b/pager.c Fri Apr 29 18:00:10 2016 -0700
@@ -1502,18 +1502,12 @@
ATTRSET(def_color);
}
- /* ncurses always wraps lines when you get to the right side of the
- * screen, but S-Lang seems to only wrap if the next character is *not*
- * a newline (grr!).
- */
-#ifndef USE_SLANG_CURSES
- if (col < pager_window->cols)
-#endif
- addch ('\n');
+ if (col < pager_window->cols)
+ mutt_window_clrtoeol (pager_window);
/*
* reset the color back to normal. This *must* come after the
- * addch('\n'), otherwise the color for this line will not be
+ * clrtoeol, otherwise the color for this line will not be
* filled to the right margin.
*/
if (flags & M_SHOWCOLOR)
@@ -1814,7 +1808,6 @@
mutt_window_clrtoeol (pager_window);
if (option (OPTTILDE))
addch ('~');
- addch ('\n');
lines++;
mutt_window_move (pager_window, lines, 0);
}