- 07 Jul, 2017 13 commits
-
-
David Lawrence Ramsey authored
Extend get_softwrap_breakpoint() to break softwrapped lines on whitespace when a flag is set. This flag is controlled by the new rcfile option "atblanks". The '>' characters marking two-column characters at the edge of the screen are disabled when it's on. If get_softwrap_breakpoint() can't find whitespace in screen range, it will break the line on the screen edge. (In this case, a blank can be on the last column of the screen, but text can't, so that a blank on the last column doesn't become invisible and possibly break the display.) This fulfills https://savannah.gnu.org/bugs/index.php?49959 . Requested-by:
Nicholas Boel <axxisd@gmail.com>
-
David Lawrence Ramsey authored
spotlight() now displays softwrapped lines chunk by chunk instead of all at once. Since softwrapped lines are no longer of constant width, the latter approach would fail if softwrapping breaks the spotlighted text. Instead of taking a string, spotlight() now takes the starting and ending columns of that string. Also, its handling of softwrapped lines is now split off into a separate function, spotlight_softwrapped().
-
David Lawrence Ramsey authored
Use actual_last_column() to properly adjust the cursor if placewewant is past the end of a softwrapped chunk.
-
David Lawrence Ramsey authored
Add the new function actual_last_column() to accomplish this.
-
David Lawrence Ramsey authored
get_chunk_row() and get_chunk_leftedge() now become wrappers around get_chunk(); the latter is only used directly in place_the_cursor() when we need to get both the row and the leftedge. get_chunk() now uses the proper formula to implement varying chunk width. Since chunk width now varies, place_the_cursor() sets the x position relative to the leftedge in a different way that works regardless of chunk width, update_softwrapped_line() loops until it gets all softwrap breakpoints instead of calculating the full length in advance and getting one full row at a time, the chunk iterators now count leftedges instead of rows, and fix_firstcolumn() does a full recalculation of the chunk that firstcolumn is on instead of simply shifting it back. Also, in update_softwrapped_line(), when a line's softwrap breakpoint is before the last column of the edit window, a ">" is now added to the end of it. The workaround in place_the_cursor() for when two-column characters straddle the edge of the screen is removed, as it's no longer needed now that chunks end before such characters. Furthermore, do_home() and do_end() use xplustabs() instead of placewewant again when calculating the leftedge, since placewewant refers to a column that may or may not be available (if it's not, the cursor will be placed wrongly). Make get_edge_and_target() use xplustabs() instead of placewewant for the same reason; this also lets us simplify get_edge_and_target(), since xplustabs() will never be greater than strlenpt(). Finally, since do_end() now has to calculate rightedge as well as rightedge_x, use the former to implement the same time-saving optimizations as in do_home(). The cursor is not yet adjusted when we try to go directly to a column past the end of a softwrap breakpoint, and placewewant handling in the vertical movement code is not yet adjusted for varying chunk lengths, but fixes for these are forthcoming. This fixes https://savannah.gnu.org/bugs/?49440.
-
David Lawrence Ramsey authored
get_chunk_row() replaces the formula "column / editwincols". get_chunk_leftedge() replaces "(column / editwincols) * editwincols". get_last_chunk_row() replaces "strlenpt() / editwincols". get_last_chunk_leftedge() replaces "(strlenpt() / editwincols) * editwincols". This prepares us for any changes in those formulas, and for more such functions later.
-
David Lawrence Ramsey authored
The new function find_softwrap_breakpoint() returns the column number of the last position in screen range where we can wrap the given text without breaking a two-column character in half (as was done until now). The returned column number is the leftedge of the next softwrapped chunk. If the end of the text is reached while searching for a wrapping point, the parameter end_of_line is set to TRUE. The new function get_chunk() uses find_softwrap_breakpoint() to find the row and leftedge corresponding to a given column of a given line.
-
David Lawrence Ramsey authored
If the position of the cursor changes horizontally, placewewant should change with it. This fixes https://savannah.gnu.org/bugs/?51407 . Reported-by:
David Lawrence Ramsey <pooka109@gmail.com>
-
Benno Schulenberg authored
Dereferencing a NULL pointer is never a good idea. This fixes https://savannah.gnu.org/bugs/?51405 . Reported-by:
David Lawrence Ramsey <pooka109@gmail.com>
-
David Lawrence Ramsey authored
-
Benno Schulenberg authored
-
Benno Schulenberg authored
Also remove the backslashes from the two syntaxes that contained them. This completes the fix for https://savannah.gnu.org/bugs/?51370.
-
Benno Schulenberg authored
Eradicate the need for backslashes, so that the start of the nanorc manual becomes true, where it says that quotes inside strings don't need to be escaped. In the bargain achieve that the empty string always switches commenting off. This fixes https://savannah.gnu.org/bugs/?51370, and fixes https://savannah.gnu.org/bugs/?51394.
-
- 06 Jul, 2017 3 commits
-
-
Benno Schulenberg authored
-
Benno Schulenberg authored
-
Benno Schulenberg authored
-
- 05 Jul, 2017 1 commit
-
-
Benno Schulenberg authored
This fixes https://savannah.gnu.org/bugs/?51348 . Reported-by:
Henrik Karlsson <henrik.karlsson@pulsen.se> Tested-by:
John Wiersba <jrw32982@yahoo.com>
-
- 03 Jul, 2017 6 commits
-
-
Benno Schulenberg authored
-
Benno Schulenberg authored
For the man page, encode them properly, and for the Info stuff, just set the right document encoding. This fixes https://savannah.gnu.org/bugs/?51369.
-
Benno Schulenberg authored
The comment marker is not «."» but «.\"», which requires three backslashes to specify. Also adjust the documentation.
-
David Lawrence Ramsey authored
Also, use proper mark-up for the examples.
-
David Lawrence Ramsey authored
This matches the style in the rest of the code.
-
David Lawrence Ramsey authored
This avoids some warnings when compiled with -pedantic: ISO C forbids comparison of ‘void *’ with function pointer ISO C forbids empty initializer braces
-
- 02 Jul, 2017 8 commits
-
-
Benno Schulenberg authored
-
Benno Schulenberg authored
When blank_statusbar() has been called, make sure it is effective. This fixes https://savannah.gnu.org/bugs/?51358.
-
Benno Schulenberg authored
(Well, redraw them when they're switched on, of course.) Redraw them so that they are shown correctly if their content changed. This fixes https://savannah.gnu.org/bugs/?51356. and fixes https://savannah.gnu.org/bugs/?51357.
-
Benno Schulenberg authored
The thing after a 'comment' directive is just a string, not the name of a program nor a command.
-
David Lawrence Ramsey authored
When the active syntax contains a comment command that specifies the empty string, this should override the default comment of "#" and should disable the Meta-3 keystroke. To achieve this, the comment string is now set by default to "#" for all syntaxes, so that it will be set when no comment command is given (including for the "none" syntax), and is unset only by explicitly specifying «comment ""» in a syntax file. This fixes https://savannah.gnu.org/bugs/?51355 . Reported-by:
David Lawrence Ramsey <pooka109@gmail.com>
-
Benno Schulenberg authored
And rename a third variable, to match another in its style.
-
Benno Schulenberg authored
-
Benno Schulenberg authored
-
- 30 Jun, 2017 3 commits
-
-
David Lawrence Ramsey authored
-
Benno Schulenberg authored
When also --nohelp is active and the terminal is so narrow that the message that --constantshow displays on the bottom row does not fit, this causes the cursor to be pushed "offscreen". Some terminal emulators don't handle this case correctly, and leave the cursor in an invisible or mistaken position. Compensate for this by moving the cursor back to the start of the row. This fixes https://savannah.gnu.org/bugs/?51335 . Reported-by:
David Lawrence Ramsey <pooka109@gmail.com>
-
Benno Schulenberg authored
The extra variable is not needed, because when having read from standard input, the filename will simply be empty. It will not be empty for any other file that was read.
-
- 29 Jun, 2017 6 commits
-
-
Benno Schulenberg authored
The dash doesn't have to be the first non-option argument: it can be anywhere among the filenames -- there can even be multiple ones (but don't mention this explicitly).
-
Benno Schulenberg authored
Negative arguments of 'fill' are bright green since a few commits. So now color all valid numeric arguments in that same style -- the yellow was hard to see on a dark background anyway. Also, color a zero tabsize as invalid.
-
David Lawrence Ramsey authored
-
David Lawrence Ramsey authored
-
Benno Schulenberg authored
This partially adresses https://savannah.gnu.org/bugs/?50998.
-
Benno Schulenberg authored
-