- 28 Mar, 2017 7 commits
-
-
Benno Schulenberg authored
The leftedge variable is a column number, not an x position.
-
David Lawrence Ramsey authored
The number of rows to draw shouldn't be compensated for the chunks of edittop that are before firstcolumn, because they are offscreen. This completes the fix for https://savannah.gnu.org/bugs/?50621.
-
David Lawrence Ramsey authored
There is no need to always increase nrows by 1 or 2 -- an increase of 1 is only needed when the line that borders on the scrolled region needs to redrawn too: when this line was horizontally scrolled or when the mark is on. This fixes https://savannah.gnu.org/bugs/?50621 . Reported-by:
David Lawrence Ramsey <pooka109@gmail.com>
-
David Lawrence Ramsey authored
The change in commit 244a503d for the <Up> and <Down> keys needs to be done for <PageUp> and <PageDown> too.
-
Benno Schulenberg authored
-
Benno Schulenberg authored
-
Benno Schulenberg authored
The complementary test on current_y should only be done when doing a scroll-only, because only then the prior line can be offscreen. This fixes https://savannah.gnu.org/bugs/?50658 . Reported-by:
David Lawrence Ramsey <pooka109@gmail.com>
-
- 27 Mar, 2017 4 commits
-
-
Benno Schulenberg authored
When scrolling backward, it is not just the bottom line of the screen that doesn't need to be redrawn: also the line /before/ the top line doesn't need a redraw. Mutatis mutandis for scrolling forward. This fixes https://savannah.gnu.org/bugs/?50657.
-
Benno Schulenberg authored
When determining the leftedge of the current chunk, it is not simply the leftedge that corresponds to the placewewant, but the leftedge that corresponds to the minimum of the placewewant and the full line span. This fixes https://savannah.gnu.org/bugs/?50653.
-
Benno Schulenberg authored
-
David Lawrence Ramsey authored
When typing PageUp or PageDOwn in non-smooth-scrolling mode, the cursor should be placed at the start of the top line of the edit window. This means that, when the line at edittop is partially scrolled offscreen, the cursor should be placed at openfile->firstcolumn, not at zero. This fixes https://savannah.gnu.org/bugs/?50645 . Reported-by:
David Lawrence Ramsey <pooka109@gmail.com>
-
- 26 Mar, 2017 3 commits
-
-
David Lawrence Ramsey authored
-
David Lawrence Ramsey authored
The iswspace() was only used when iswblank() was missing. The latter is now provided by gnulib, so it is always available, so iswspace() is not used at all anymore.
-
Benno Schulenberg authored
Mention the ability to use <Tab> in the search history, the ability to restore the cursor position when reopening a file, the ability to read output of a command, and the lack of file-managing commands in the file browser.
-
- 24 Mar, 2017 4 commits
-
-
Benno Schulenberg authored
-
David Lawrence Ramsey authored
-
David Lawrence Ramsey authored
-
Benno Schulenberg authored
The "./" is a shorthand for "current working directory". It is better to specify it, because it differs from what Pico does: reading always from the user's home directory no matter where the editor was started.
-
- 23 Mar, 2017 5 commits
-
-
Benno Schulenberg authored
-
Benno Schulenberg authored
Only use the "from" thing when an operating directory is in effect, because /only/ then the indicated directory can be something other than "./". Also, make it so that there is no space before the colon.
-
Benno Schulenberg authored
And slightly change the existing one for normal users.
-
Benno Schulenberg authored
"Q" is a pretty standard key to exit from something, and "X" is fairly mnemonic -- better than "E" at least.
-
Benno Schulenberg authored
Put all the movement keys together, in order of ascending stride. Also, move the Undo/Redo keystrokes further up, so that, when the user has a somewhat wider terminal than the usual 80 characters, these keystrokes will be shown -- they are far more interesting than the ^Y and ^V ones, for which PgUp and PgDn can be used.
-
- 22 Mar, 2017 17 commits
-
-
Benno Schulenberg authored
But apparently none of these cases occur, because I can't trigger them.
-
Benno Schulenberg authored
-
Benno Schulenberg authored
This could happen when a tab or a double-width character straddles the boundary between two softwrapped chunks.
-
David Lawrence Ramsey authored
If the number of columns in the edit window changes (which currently only happens in two places: in regenerate_screen(), called when the window is resized; and in main(), when line numbering mode is toggled), the display will break if we're in softwrap mode and firstcolumn is nonzero. This is because the column width of softwrapped chunks has changed, and firstcolumn is no longer the starting column of a chunk, an assumption that all code using firstcolumn relies on. To fix this problem, add a new function, ensure_firstcolumn_is_aligned(), to adjust firstcolumn to the starting column of the chunk it's on, and use it when the number of columns in the edit window changes. (Note that this function uses the simplest possible fix, and could probably be made more sophisticated.)
-
David Lawrence Ramsey authored
In do_replace(), replacing text may change firstcolumn if the next match is offscreen, and replacing text after that will not change it back. In order to keep the viewport unchanged, we have to save and restore not just edittop, but firstcolumn as well.
-
David Lawrence Ramsey authored
In do_int_spell_fix(), spell-checking text may change firstcolumn if the next match is offscreen, and spell-checking text after that will not change it back. In order to keep the viewport unchanged, we have to save and restore not just edittop, but firstcolumn as well.
-
David Lawrence Ramsey authored
In do_justify(), justifying text may change firstcolumn if the paragraph ends offscreen, and unjustifying the text again will not change it back. In order to keep the viewport unchanged, we have to save and restore not just edittop, but firstcolumn as well.
-
David Lawrence Ramsey authored
Copying text involves first cutting it and then quickly pasting it back. However, cutting the text may change firstcolumn if the mark is offscreen. To keep the viewport unchanged, copy_text() has to save and restore not just edittop, but firstcolumn as well.
-
David Lawrence Ramsey authored
Now that we can add text to the bottom right corner of the screen without scrolling the full line onscreen, do_output() needs to refresh the screen in that case, since it would put the cursor offscreen otherwise. Accomplish this by borrowing logic from do_right().
-
David Lawrence Ramsey authored
In do_up() when scroll_only is TRUE, if we're at the top of the screen in softwrap mode, it's not enough to check that edittop is on fileage. We also need to check that firstcolumn is zero. In do_up() when scroll_only is FALSE, if we're at the top of the screen in softwrap mode, current_y should be zero. This is equivalent to how, in do_down() when scroll_only is FALSE, current_y is (editwinrows - 1) at the bottom of the screen in softwrap mode. Since edittop can now be partially scrolled off the screen even when it takes up the entire screen, checking for edittop's being equal to openfile->current->next there no longer applies.
-
David Lawrence Ramsey authored
The new function, update_softwrapped_line(), is called from inside update_line() when softwrap mode is on, so that existing calls remain unchanged. It takes no index, instead displaying edittop from column firstcolumn, and all other lines from column zero. If current is on edittop, it's displayed using the edittop rules, but this is not a problem: if current[current_x] is above edittop at column firstcolumn, it's offscreen, and that should be handled before calling update_line() anyway. Together with the preceding bunch of changes, this fixes https://savannah.gnu.org/bugs/?47667.
-
David Lawrence Ramsey authored
When counting rows in softwrap mode, reset_cursor() should compensate for the number of softwrapped chunks that edittop takes up before firstcolumn.
-
David Lawrence Ramsey authored
Make current_is_above_screen() check for current[current_x] being above edittop at column firstcolumn, and make current_is_below_screen() start counting down from edittop at column firstcolumn instead of edittop at column zero. This means that both functions now account for softwrapped chunks properly.
-
David Lawrence Ramsey authored
Actually enable scrolling edittop partially off the screen by making edit_scroll() and adjust_viewport() use firstcolumn properly when iterating through softwrapped chunks in softwrap mode, or lines in non-softwrap mode. In non-softwrap mode, firstcolumn should still always be zero, because it's initially set to that, and because passing it through the iterators will maintain it at that. This fixes https://savannah.gnu.org/bugs/?49100 . Reported-by:
David Lawrence Ramsey <pooka109@gmail.com>
-
David Lawrence Ramsey authored
We want to be able to scroll the line at edittop partially off the screen. For this to be possible, the new variable firstcolumn stores the starting column of the viewport -- the starting column in the line that edittop points to. Since firstcolumn is used by go_back_chunks() and go_forward_chunks(), it can't be completely #ifdefed out when NANO_TINY is set, but outside of softwrap mode it should always be zero. Currently firstcolumn is initialized to zero, reset to zero when toggling softwrap mode off, and reset to zero when switching buffers while softwrap mode is off. It's otherwise unused, but its uses are forthcoming.
-
David Lawrence Ramsey authored
Since all lines can be partially scrolled off the screen now (except for the top line of the edit window, which is forthcoming), ensure_line_is_visible() is no longer needed.
-
David Lawrence Ramsey authored
Since all lines can be partially scrolled off the screen now (except for edittop, which is forthcoming), the maxlines global variable and its computation mechanism are no longer needed.
-