- 14 Jul, 2017 3 commits
-
-
Benno Schulenberg authored
And in the bargain improve some mark-up here and there.
-
Benno Schulenberg authored
-
Benno Schulenberg authored
-
- 13 Jul, 2017 6 commits
-
-
Benno Schulenberg authored
And rewrap the feature toggles, so that a title does not start a sentence.
-
Benno Schulenberg authored
And refer backward instead of forward.
-
Benno Schulenberg authored
-
Benno Schulenberg authored
I like it better that ^X stays in the same position compared to the main screen: the lower left corner.
-
Benno Schulenberg authored
This fixes https://savannah.gnu.org/bugs/?51457.
-
Benno Schulenberg authored
The help lines need to be redrawn one step after a justification (whether it has been undone or not, to replace "Unjustify" with "Uncut" again for ^U), and after switching buffers (to update a possibly changed tag for ^T). This fixes https://savannah.gnu.org/bugs/?51455.
-
- 12 Jul, 2017 7 commits
-
-
David Lawrence Ramsey authored
Make them reflect the split into two functions, the direct use of tabsize, and the difference in behavior between indent and unindent.
-
David Lawrence Ramsey authored
Since all indentation and unindentation is by a tab, or by a tab's worth of spaces, use tabsize directly.
-
David Lawrence Ramsey authored
Also remove one unneeded blank line.
-
David Lawrence Ramsey authored
-
David Lawrence Ramsey authored
-
David Lawrence Ramsey authored
The parameter 'cols', that indicates how many columns to indent or unindent, is changed to be always positive, so the check for being negative can go. And it could never be zero anyway.
-
David Lawrence Ramsey authored
This is the first step toward splitting them into two dedicated functions, instead of letting do_indent() handle both cases.
-
- 11 Jul, 2017 2 commits
-
-
Benno Schulenberg authored
The precalculation of the multiline regexes no longer looks at the keyboard every second, and the backup code makes use of futimens() nowadays.
-
Benno Schulenberg authored
Well, it will compile even without that include. :| I don't know why, since it does use va_list.
-
- 10 Jul, 2017 3 commits
-
-
Benno Schulenberg authored
When compiling with 'clang', it would say: warning: expression which evaluates to zero treated as a null pointer constant of type 'char *'.
-
Benno Schulenberg authored
-
David Lawrence Ramsey authored
This fixes https://savannah.gnu.org/bugs/?51427.
-
- 09 Jul, 2017 2 commits
-
-
Benno Schulenberg authored
-
Benno Schulenberg authored
-
- 07 Jul, 2017 17 commits
-
-
Benno Schulenberg authored
In nano, -a is only effective when also -$ is given, so this will not conflict with Pico since Pico does not know the -$ option.
-
Benno Schulenberg authored
-
David Lawrence Ramsey authored
This should eliminate all cases where the newline is pushed off the edge of the screen in non-atblanks softwrap mode. Also, it allows the use of the last column of the screen in atblanks softwrap mode when a piece of text does not contain any blanks. This avoids the unreachable end-of-line reported on the mailing list: http://lists.gnu.org/archive/html/nano-devel/2017-06/msg00011.html.
-
Benno Schulenberg authored
And then elide the function entirely as it's called just once.
-
Benno Schulenberg authored
-
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.
-