1. 14 Sep, 2016 1 commit
  2. 13 Sep, 2016 1 commit
  3. 29 Aug, 2016 2 commits
  4. 21 Aug, 2016 2 commits
  5. 01 Aug, 2016 4 commits
  6. 28 Jul, 2016 1 commit
  7. 24 Jul, 2016 1 commit
  8. 27 May, 2016 1 commit
  9. 04 May, 2016 1 commit
    • 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
  10. 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
  11. 15 Apr, 2016 1 commit
    • Benno Schulenberg's avatar
      softwrap: adjust for current_x when computing the amount to scroll · 2d50c4f2
      Benno Schulenberg authored
      The number of lines to scroll is: the y position of the start of the
      current line, plus the extra lines that this line occupies, plus the
      extra lines that the next line occupies, plus one, minus the y position
      of the last window line.
      
      The y position of the start of the current line is current_y -
      xplustabs() / COLS, the extra lines are strlenpt(data) / COLS,
      and the y position of the last window line is editwinrows - 1.
      
      Note that we first compute the amount to scroll before actually moving
      to the next line, because we need the current value of current_x, not
      the one that it will have in the next line.  The placewewant value is
      not good either, because it might be beyond where we actually are.
      
      This fixes https://savannah.gnu.org/bugs/?47665.
      2d50c4f2
  12. 13 Apr, 2016 3 commits
    • Benno Schulenberg's avatar
      screen: don't redraw some lines when doing a full refresh anyway · 503654e6
      Benno Schulenberg authored
      When in softwrap mode and scrolling down a line, and thus going to
      do a full refresh, get out and don't bother redrawing the current
      and prior lines first.
      503654e6
    • Benno Schulenberg's avatar
      screen: don't redraw the current line unnecessarily · e393a6c3
      Benno Schulenberg authored
      When moving the cursor up or down one line, redraw the new current
      line only when the target column (placewewant) is beyond the screen,
      or when the mark is on.
      
      (This still redraws the current and prior lines unnecessarily when
      they are in fact shorter than the screen is wide and the mark is off,
      but we'll let that pass for now.)
      
      Also, when softwrap is on, we don't have have to redraw the current
      and prior lines at all (when the mark is off): they are in full view,
      there is nothing to show or hide.
      e393a6c3
    • Benno Schulenberg's avatar
      screen: a full refresh is only needed when softwrap is on · 9d793032
      Benno Schulenberg authored
      When scrolling down a line, a full refresh of the edit window is only
      needed when softwrap is on, because only then the movement is irregular.
      When each file line takes up just one screen line (softwrap is off),
      edit_scroll() is perfectly able to scroll and redraw only the necessary
      lines.
      
      (But... when doing a full refresh anyway with softwrap, why bother
      scrolling at all?  Why not just adjust edittop and call refresh?)
      9d793032
  13. 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
  14. 07 Apr, 2016 1 commit
  15. 05 Apr, 2016 1 commit
  16. 22 Feb, 2016 1 commit
  17. 08 Dec, 2015 1 commit
  18. 27 Oct, 2015 2 commits
  19. 05 Sep, 2015 2 commits
  20. 26 Jul, 2015 1 commit
  21. 20 Apr, 2015 1 commit
  22. 23 Jun, 2014 1 commit
  23. 21 Jun, 2014 1 commit
  24. 09 Jun, 2014 2 commits
  25. 16 May, 2014 1 commit
  26. 15 May, 2014 1 commit
  27. 30 Apr, 2014 1 commit
  28. 24 Mar, 2014 1 commit
  29. 05 Mar, 2014 1 commit