1. 25 Apr, 2017 1 commit
  2. 19 Apr, 2017 2 commits
  3. 17 Apr, 2017 2 commits
  4. 11 Apr, 2017 1 commit
  5. 10 Apr, 2017 1 commit
  6. 09 Apr, 2017 1 commit
    • Benno Schulenberg's avatar
      copyright: update the years, use ranges, and explain this usage · 754c62c5
      Benno Schulenberg authored
      The interval 2013-2017 for the Free Software Foundation is valid
      because in those years there were releases with changes by either
      Chris or David, and the GNU maintainers guide advises to mention
      a new year in all files of a package, not just in the ones that
      actually changed, and be done with it for the rest of the year.
      754c62c5
  7. 06 Apr, 2017 1 commit
    • Benno Schulenberg's avatar
      bindings: make ^Home and ^End go to top and tail of buffer · cb0806b2
      Benno Schulenberg authored
      On some terminal emulators, Ctrl+Home and Ctrl+End produce special
      keycodes, distinct from plain Home and End.  Make the users of those
      emulators (and of the Linux console) glad by making ^Home and ^End
      do the obvious thing, and the combinations with Shift too.
      cb0806b2
  8. 04 Apr, 2017 3 commits
  9. 29 Mar, 2017 2 commits
  10. 22 Mar, 2017 5 commits
    • David Lawrence Ramsey's avatar
      softwrap: adjust firstcolumn when the window width changes · 0389a1d9
      David Lawrence Ramsey authored
      If the number of columns in the edit window changes (which currently
      only happens in two places: in regenerate_screen(), called when the
      window is resized; and in main(), when line numbering mode is toggled),
      the display will break if we're in softwrap mode and firstcolumn is
      nonzero.  This is because the column width of softwrapped chunks has
      changed, and firstcolumn is no longer the starting column of a chunk,
      an assumption that all code using firstcolumn relies on.
      
      To fix this problem, add a new function, ensure_firstcolumn_is_aligned(),
      to adjust firstcolumn to the starting column of the chunk it's on, and
      use it when the number of columns in the edit window changes.
      
      (Note that this function uses the simplest possible fix, and could
      probably be made more sophisticated.)
      0389a1d9
    • David Lawrence Ramsey's avatar
      softwrap: account for softwrapped chunks when adding text · dd08b638
      David Lawrence Ramsey authored
      Now that we can add text to the bottom right corner of the screen
      without scrolling the full line onscreen, do_output() needs to refresh
      the screen in that case, since it would put the cursor offscreen
      otherwise.  Accomplish this by borrowing logic from do_right().
      dd08b638
    • David Lawrence Ramsey's avatar
      softwrap: prepare for a more flexible viewport · 4144f76e
      David Lawrence Ramsey authored
      We want to be able to scroll the line at edittop partially off the
      screen.  For this to be possible, the new variable firstcolumn stores
      the starting column of the viewport -- the starting column in the line
      that edittop points to.
      
      Since firstcolumn is used by go_back_chunks() and go_forward_chunks(),
      it can't be completely #ifdefed out when NANO_TINY is set, but outside
      of softwrap mode it should always be zero.
      
      Currently firstcolumn is initialized to zero, reset to zero when
      toggling softwrap mode off, and reset to zero when switching buffers
      while softwrap mode is off.  It's otherwise unused, but its uses are
      forthcoming.
      4144f76e
    • David Lawrence Ramsey's avatar
      weeding: remove ensure_line_is_visible() · 80b3a301
      David Lawrence Ramsey authored
      Since all lines can be partially scrolled off the screen now
      (except for the top line of the edit window, which is forthcoming),
      ensure_line_is_visible() is no longer needed.
      80b3a301
    • David Lawrence Ramsey's avatar
      softwrap: iterate through softwrapped chunks better in do_mouse() · 52087408
      David Lawrence Ramsey authored
      Use go_back_chunks() and go_forward_chunks() to move from the row
      current_y is on to the row mouse_row is on.  Now softwrap mode and
      non-softwrap mode will behave the same way when we can scroll edittop
      partially off the screen, which is forthcoming.  Accordingly, remove
      the call to ensure_line_is_visible(), as it no longer applies.
      
      The old code did work, but it behaved differently between softwrap mode
      (which counted down from edittop) and non-softwrap mode (which counted
      up or down from current_y to take less time, and used a double loop to
      keep current from going to NULL).
      
      The new code counts up or down from current_y in both softwrap mode and
      non-softwrap mode.  In non-softwrap mode, it also avoids the double loop,
      since go_back_chunks() and go_forward_chunks() keep the filestructs they
      operate on from going to NULL.
      52087408
  11. 20 Mar, 2017 1 commit
  12. 06 Mar, 2017 6 commits
  13. 25 Feb, 2017 2 commits
  14. 24 Feb, 2017 1 commit
  15. 21 Feb, 2017 1 commit
  16. 17 Feb, 2017 2 commits
  17. 13 Feb, 2017 2 commits
  18. 12 Feb, 2017 1 commit
  19. 05 Feb, 2017 2 commits
  20. 19 Jan, 2017 1 commit
  21. 08 Jan, 2017 1 commit
    • David Lawrence Ramsey's avatar
      weeding: remove another unnecessary setting of openfile->current_y · d35ecd02
      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 not need current_y.
      d35ecd02
  22. 03 Jan, 2017 1 commit