1. 25 Apr, 2016 2 commits
    • Benno Schulenberg's avatar
      tabbing: make sure to refresh the edit window when returning to it · 3e1d2b90
      Benno Schulenberg authored
      Since commit 41ed6907, cancelling a prompt after tabbing would sometimes
      leave the list of file names on the screen.  When testing this first,
      it worked fine -- I was fooled again by 'edit_refresh_needed' already
      being TRUE when nano has just started up and sits waiting for the first
      key stroke.  I have to hunt this down and kill it.
      3e1d2b90
    • Benno Schulenberg's avatar
      scrolling: catch the special case of reading a file from standard input · 907ba3a2
      Benno Schulenberg authored
      Since commit dac0aa1d, nano would leave edittop at current after reading
      data from standard input, meaning that everything that had been read in
      was invisible, "scrolled off" the top of the screen.  Correct this by
      explicitly setting edittop.
      
      The above does not happen for ^R (^X) because it has a special mechanism
      to save and restore edittop.  Nor does it happen for ^R ^X M-F because it
      sets current to the top of the file and refreshing the screen will make
      edittop follow, or -- in case just one unterminated line was read in --
      edittop will already be equal to current.
      907ba3a2
  2. 24 Apr, 2016 4 commits
  3. 23 Apr, 2016 6 commits
  4. 17 Apr, 2016 10 commits
  5. 16 Apr, 2016 6 commits
  6. 15 Apr, 2016 3 commits
  7. 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
  8. 12 Apr, 2016 2 commits
  9. 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