- 12 Jan, 2017 3 commits
-
-
Benno Schulenberg authored
-
Benno Schulenberg authored
-
Benno Schulenberg authored
(The mistake becomes visible when you go to the end of a very long line of double-width characters: the $ will be shown on the right edge, even though you're already at line's end.) This reverts commit 16a7fd4b from yesterday.
-
- 11 Jan, 2017 3 commits
-
-
Benno Schulenberg authored
What is the point of parsing a number when you're not interested in the result? All callers of parse_num() pass a container for it.
-
Benno Schulenberg authored
This addresses part of https://savannah.gnu.org/patch/?9216 . Reported-by:
David Lawrence Ramsey <pooka109@gmail.com>
-
Benno Schulenberg authored
-
- 09 Jan, 2017 7 commits
-
-
Benno Schulenberg authored
When there is no end match after a start, it is pointless to look for any more starts because also they will not have any end match, so nothing will get painted -- just cut the loop short.
-
Benno Schulenberg authored
-
Benno Schulenberg authored
-
Benno Schulenberg authored
-
Benno Schulenberg authored
This fixes https://savannah.gnu.org/bugs/?50009.
-
Benno Schulenberg authored
-
Benno Schulenberg authored
The renamed variable 'index' is not the start of a match (as some comment mistakenly said), but from where in the line we start looking for a next match. Also, use one more goto to allow unindenting a big piece of code, and shortcircuit two while loops for two more small unindents.
-
- 08 Jan, 2017 13 commits
-
-
Benno Schulenberg authored
-
David Lawrence Ramsey authored
The setting of current_y in copy_from_filestruct() also appears to be a holdover from the days of a more-common STATIONARY scrolling mode. do_cut_text() uses the above function when copying text (uncutting text again right after cutting it). Since the text is effectively the same afterward, current_y doesn't need to change. do_uncut_text(), however, does need current_y up to date in one case: when uncutting a full screen or less' worth of lines, focusing will be FALSE, and it uses edit_refresh(), so it will use STATIONARY scrolling mode then. Take a cue from do_insertfile() and call reset_cursor() to get an updated current_y. (Note that the check for a full screen or less' worth of lines uses incorrect values when in softwrap mode, but that's a separate problem.) undo_cut(), do_redo(), and backup_lines() do not need set current_y because they all result in edit_refresh() with focusing = TRUE, so they do a CENTERING scroll which does ...
-
Benno Schulenberg authored
-
David Lawrence Ramsey authored
-
Benno Schulenberg authored
At first paintlen was computed as a column span, and then converted to a character count... Confusing.
-
Benno Schulenberg authored
The top_x variable has already been forced to become equal to from_x if it was before it. So start_col will be at least zero.
-
Benno Schulenberg authored
-
Benno Schulenberg authored
-
Benno Schulenberg authored
It is the misuse of "x_" to mean a column position on screen, and the misuse of "_col" to mean a character position in a string that causes this confusion.
-
Benno Schulenberg authored
All these different "start"s and "end"s are confusing. Use instead 'from_x and 'till_x' to remember which part of the current line is visible now on screen and is thus represented in 'converted'.
-
Benno Schulenberg authored
Also adjust a few comments.
-
Benno Schulenberg authored
In order to determine the correct multidata for a line that doesn't have such data yet, the whole line must be examined, not just the part that fits within the screen width. This fixes https://savannah.gnu.org/bugs/?49978.
-
Benno Schulenberg authored
That is: only extend the current Del or Backspace undo item when the cursor is still (or again) at the same spot. This fixes https://savannah.gnu.org/bugs/?50006.
-
- 06 Jan, 2017 3 commits
-
-
David Lawrence Ramsey authored
This fixes https://savannah.gnu.org/bugs/?49994 . Reported-by:
David Lawrence Ramsey <pooka109@gmail.com>
-
David Lawrence Ramsey authored
Instead of setting openfile->current_y (and wrongly so), just call reset_cursor() to recompute current_y and place the cursor on that line (if it is not offscreen).
-
Benno Schulenberg authored
-
- 05 Jan, 2017 3 commits
-
-
Benno Schulenberg authored
-
Benno Schulenberg authored
The search routine begins searching right after the cursor and behaves as if the line starts there, which means that a beginning-of-word anchor (\< or \b) will match there also when in fact the cursor is sitting in the middle of a word. To prevent finding a false match, verify that for a regex that starts with a BOW anchor the found match is actually the start of a word. This fixes https://savannah.gnu.org/bugs/?45630.
-
Benno Schulenberg authored
-
- 03 Jan, 2017 7 commits
-
-
Benno Schulenberg authored
This fixes https://savannah.gnu.org/bugs/?49824.
-
Benno Schulenberg authored
-
David Lawrence Ramsey authored
Since do_mouse() uses edit_redraw(), openfile->current_y will be immediately recalculated, so there's no point in changing it now. Use a temporary variable instead.
-
David Lawrence Ramsey authored
The value of sameline doesn't change, so it can be initialized to that. Since i holds openfile->current_y, it should be ssize_t, not size_t. And it's better to do the most significant part of a calculation first.
-
Benno Schulenberg authored
The conditionalizing saved negligible amounts of space, of memory, and of speed.
-
Benno Schulenberg authored
In that case setting the latter to TRUE is misleading. So don't do that.
-
Benno Schulenberg authored
-
- 02 Jan, 2017 1 commit
-
-
David Lawrence Ramsey authored
Many of the adjustments of the value of openfile->current_y appear to be a holdover from the days when certain functions had to account for what is now called STATIONARY scrolling mode, which depends on the value of current_y. Remove these adjustement where they are superfluous. do_para_begin(), do_para_end(), and do_bracket_match() update the screen through edit_redraw(), which uses either CENTERING or FLOWING scrolling mode, so their setting of current_y is redundant and useless, as it will be ignored and then overridden by the next call to reset_cursor(). findnextstr() is called by go_looking() [which calls edit_redraw(), see above], and by do_replace_loop() and do_int_spell_fix(), which both call edit_refresh(), which in this case only uses CENTERING scrolling mode since focusing is TRUE. (Additionally, the adjustments of current_y in findnextstr() and do_bracket_match() use incorrect values when in softwrap mode.) find_paragraph() doesn't need to save or restore current_y, because it doesn't do any screen updates. do_justify() calls edit_refresh() with focusing set to TRUE, so it uses the CENTERING scrolling mode. do_alt_speller() and do_formatter() do not need to save and restore current_y, because they don't modify it in any way. This addresses https://savannah.gnu.org/patch/?9197.
-