1. 17 Apr, 2016 10 commits
  2. 16 Apr, 2016 6 commits
  3. 15 Apr, 2016 3 commits
  4. 13 Apr, 2016 5 commits
    • Benno Schulenberg's avatar
      titlebar: snip two superfluous tests for having enough space · 6414f9f0
      Benno Schulenberg authored
      If nano has less than four columns available, it will die,
      so there will always be room for at least four characters.
      6414f9f0
    • Benno Schulenberg's avatar
      screen: elide a variable and serialize some logic for clarity · 22460294
      Benno Schulenberg authored
      Also, don't force a full refresh of the edit window simply because the
      current line needs to be horizontally scrolled.  And further, when the
      adjustment of edittop has determined that a full refresh is needed,
      get out and don't bother scrolling some lines first.
      22460294
    • 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
  5. 12 Apr, 2016 2 commits
  6. 11 Apr, 2016 2 commits
    • Benno Schulenberg's avatar
      screen: avoid redrawing a line twice · 4b5b66a8
      Benno Schulenberg authored
      The old_current line needs to be redrawn only if it differs from current,
      and if it wasn't drawn already by the iteration for when the mark is on.
      
      Also make the conditions involving horizontal scrolling more precise.
      4b5b66a8
    • 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
  7. 10 Apr, 2016 4 commits
  8. 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
  9. 07 Apr, 2016 1 commit
  10. 05 Apr, 2016 6 commits