1. 29 Aug, 2016 1 commit
  2. 26 Aug, 2016 1 commit
  3. 07 Aug, 2016 1 commit
  4. 27 Jul, 2016 2 commits
  5. 24 Jun, 2016 2 commits
  6. 21 Jun, 2016 2 commits
  7. 20 Jun, 2016 1 commit
  8. 02 Jun, 2016 1 commit
  9. 01 Jun, 2016 2 commits
  10. 28 May, 2016 1 commit
  11. 27 May, 2016 1 commit
  12. 16 May, 2016 2 commits
  13. 12 May, 2016 1 commit
  14. 06 May, 2016 2 commits
  15. 04 May, 2016 2 commits
    • Benno Schulenberg's avatar
      spelling: don't partition the file for replacements in a marked region · 433c7e5d
      Benno Schulenberg authored
      Partitioning the file makes the undo system lose track, so that undoing
      things has a good chance of losing data.  Instead, just make sure that
      the region is marked "backwards", with current at the top and the mark
      at the bottom, and then let the replace loop take care of not going
      outside of the marked region.
      
      This also has the effect that if the marked region fits entirely on the
      screen, or all the misspellings are onscreen, then the screen will not
      be scrolled at all.  Which makes for a smooth experience.
      
      This fixes https://savannah.gnu.org/bugs/?47836,
      and fixes https://savannah.gnu.org/bugs/?45573.
      433c7e5d
    • Benno Schulenberg's avatar
      scrolling: center the cursor when inserted stuff does not fit on screen · 318ed6b1
      Benno Schulenberg authored
      Since nano-2.4.1, reading in or pasting a large piece of text would put
      the cursor on the bottom line, leaving only one line of the non-read or
      non-pasted text visible.  This is different from the centering behavior
      of Pico, and somewhat disorienting, as you can't see "where you are" any
      more in relation to the file as it was.
      
      So now center the cursor whenever the read or pasted text is larger than
      the screen, but don't center it when the text fits entirely on the screen.
      (The latter avoids the effect of the screen jumping unnecessarily when
      inserting just a few lines while the cursor is near the bottom.)
      
      To achieve this behavior: default to focusing, and temporarily set it to
      FALSE when the focusing effect is unwanted.
      
      This fixes https://savannah.gnu.org/bugs/?47841.
      318ed6b1
  16. 03 May, 2016 1 commit
  17. 02 May, 2016 1 commit
    • Benno Schulenberg's avatar
      search: elide an unneeded function · 05238f31
      Benno Schulenberg authored
      When we're spell checking, we don't need a special mechanism to detect
      we have come full circle: reaching the end-of-buffer means we're done.
      So don't bother to reset came_full_circle when we're spell checking
      (when begin == NULL) but simply ignore its value.
      05238f31
  18. 01 May, 2016 3 commits
  19. 25 Apr, 2016 2 commits
    • Benno Schulenberg's avatar
      screen: rename 'edit_refresh_needed' to 'refresh_needed' · 53f4a9f5
      Benno Schulenberg authored
      For a little contrast with the function edit_refresh() -- it's
      annoying that when you search for the latter you get to see all
      the settings of the flag too.
      53f4a9f5
    • Benno Schulenberg's avatar
      screen: don't always set 'edit_refresh_needed' when adjusting edittop · b97c36c2
      Benno Schulenberg authored
      The function edit_update() is called by edit_refresh() itself, so it is
      silly that the first sets 'edit_refresh_needed' to TRUE.  This setting
      is needed only in a few cases -- in the others it's not needed because
      the screen does not need to be refreshed (it was just about positioning
      the cursor), or 'edit_refresh_needed' has already been set by a call to
      goto_line_posx().  So, just set the flag in the five places that need it
      and spare the other four calls.
      b97c36c2
  20. 16 Apr, 2016 1 commit
  21. 11 Apr, 2016 1 commit
    • Benno Schulenberg's avatar
      screen: concentrate the setting of placewewant · aa1ae0a1
      Benno Schulenberg authored
      Instead of saving the current value of placewewant, then setting the
      new value, and then passing the old value to edit_redraw() in seven
      different places, just let edit_redraw() do this saving and setting.
      
      In the bargain placewewant is now only recalculated when it matters
      -- when allow_update is TRUE -- and not when it's superfluous.
      aa1ae0a1
  22. 10 Apr, 2016 2 commits
    • Benno Schulenberg's avatar
      search: avoid saving and restoring placewewant when bracket matching · 023fccb9
      Benno Schulenberg authored
      Now that findnextstr() no longer sets placewewant, we can can make
      a copy of the old value just where needed: when a bracket is found.
      023fccb9
    • Benno Schulenberg's avatar
      search: don't set placewewant when we are just iterating · ea4e9b31
      Benno Schulenberg authored
      In the innermost search loop, don't set placewewant, because this loop
      is also used for replacing and spell fixing, when we don't really want
      to be there: we are just passing through.  Not setting placewewant means
      we don't need to save and restore it in those passing-through routines.
      
      The value of placewewant is only relevant when doing cursor movement,
      which doesn't happen during replacing nor spell checking, so there is
      no need to keep placewewant up to date -- it is set when it matters:
      at the end of go_looking().
      ea4e9b31
  23. 08 Apr, 2016 1 commit
    • Benno Schulenberg's avatar
      searching: don't keep track of current_y, but calculate it at the end · 7ba356a6
      Benno Schulenberg authored
      Stop keeping track of the vertical screen position when searching for
      something.  If nothing is found, current_y doesn't change, and all the
      incrementing/decrementing was a waste of time.  If something is found
      and it is onscreen, it is easy to calculate the new current_y.  And if
      something is found and it is offscreen, then current_y is irrelevant,
      because we will be either centering the found occurrence (searching)
      or putting it on the top or bottom line (bracket matching).
      
      (The above does not take softwrapping into account, but neither did
      the old code, so this doesn't introduce any new bugs.)
      
      (Also, when the search wraps, and the viewport is away from head or
      tail of the file, and the found occurrence is within the viewport,
      then the incremented/decremented current_y would be way wrong, but
      this didn't have any adverse effects as far as I could tell.  It
      seems that current_y is irrelevant in most cases.)
      7ba356a6
  24. 07 Apr, 2016 1 commit
  25. 05 Apr, 2016 1 commit
  26. 04 Apr, 2016 1 commit
  27. 30 Mar, 2016 2 commits
  28. 29 Mar, 2016 1 commit