1. 15 Jul, 2017 2 commits
  2. 14 Jul, 2017 8 commits
  3. 13 Jul, 2017 6 commits
  4. 12 Jul, 2017 7 commits
  5. 11 Jul, 2017 2 commits
  6. 10 Jul, 2017 3 commits
  7. 09 Jul, 2017 2 commits
  8. 07 Jul, 2017 10 commits
    • Benno Schulenberg's avatar
      options: recognize -a and --atblanks on the command line · ac7a0718
      Benno Schulenberg authored
      In nano, -a is only effective when also -$ is given, so this will
      not conflict with Pico since Pico does not know the -$ option.
      ac7a0718
    • Benno Schulenberg's avatar
      09723b07
    • David Lawrence Ramsey's avatar
      softwrap: don't flag EOL too early, nor break continuous text too early · dd667ce9
      David Lawrence Ramsey authored
      This should eliminate all cases where the newline is pushed off the edge
      of the screen in non-atblanks softwrap mode.  Also, it allows the use of
      the last column of the screen in atblanks softwrap mode when a piece of
      text does not contain any blanks.
      
      This avoids the unreachable end-of-line reported on the mailing list:
      http://lists.gnu.org/archive/html/nano-devel/2017-06/msg00011.html.
      dd667ce9
    • Benno Schulenberg's avatar
      tweaks: elide unneeded calls of get_last_chunk_leftedge() · 482fb352
      Benno Schulenberg authored
      And then elide the function entirely as it's called just once.
      482fb352
    • Benno Schulenberg's avatar
      8766e7bd
    • David Lawrence Ramsey's avatar
      new feature: allow lines to be softwrapped at whitespace · bb4d0d54
      David Lawrence Ramsey authored
      Extend get_softwrap_breakpoint() to break softwrapped lines on
      whitespace when a flag is set.  This flag is controlled by the new
      rcfile option "atblanks".  The '>' characters marking two-column
      characters at the edge of the screen are disabled when it's on.
      
      If get_softwrap_breakpoint() can't find whitespace in screen range, it
      will break the line on the screen edge.  (In this case, a blank can be
      on the last column of the screen, but text can't, so that a blank on the
      last column doesn't become invisible and possibly break the display.)
      
      This fulfills https://savannah.gnu.org/bugs/index.php?49959
      
      .
      Requested-by: default avatarNicholas Boel <axxisd@gmail.com>
      bb4d0d54
    • David Lawrence Ramsey's avatar
      replacing: make spotlight() account for varying chunk width · aa04ad4f
      David Lawrence Ramsey authored
      spotlight() now displays softwrapped lines chunk by chunk instead of all
      at once.  Since softwrapped lines are no longer of constant width, the
      latter approach would fail if softwrapping breaks the spotlighted text.
      
      Instead of taking a string, spotlight() now takes the starting and ending
      columns of that string.  Also, its handling of softwrapped lines is now
      split off into a separate function, spotlight_softwrapped().
      aa04ad4f
    • David Lawrence Ramsey's avatar
      moving: make vertical movement account for varying chunk width · a4c2eaa2
      David Lawrence Ramsey authored
      Use actual_last_column() to properly adjust the cursor if placewewant
      is past the end of a softwrapped chunk.
      a4c2eaa2
    • David Lawrence Ramsey's avatar
      softwrap: in do_mouse(), keep the cursor before a softwrap breakpoint · 4d7735c8
      David Lawrence Ramsey authored
      Add the new function actual_last_column() to accomplish this.
      4d7735c8
    • David Lawrence Ramsey's avatar
      softwrap: make the changes to actually allow the chunk width to vary · 8490f4ac
      David Lawrence Ramsey authored
      get_chunk_row() and get_chunk_leftedge() now become wrappers around
      get_chunk(); the latter is only used directly in place_the_cursor()
      when we need to get both the row and the leftedge.  get_chunk() now
      uses the proper formula to implement varying chunk width.
      
      Since chunk width now varies, place_the_cursor() sets the x position
      relative to the leftedge in a different way that works regardless
      of chunk width, update_softwrapped_line() loops until it gets all
      softwrap breakpoints instead of calculating the full length in
      advance and getting one full row at a time, the chunk iterators
      now count leftedges instead of rows, and fix_firstcolumn() does a
      full recalculation of the chunk that firstcolumn is on instead of
      simply shifting it back.
      
      Also, in update_softwrapped_line(), when a line's softwrap breakpoint
      is before the last column of the edit window, a ">" is now added to
      the end of it.
      
      The workaround in place_the_cursor() for when two-column characters
      straddle the edge of the screen is removed, as it's no longer needed
      now that chunks end before such characters.
      
      Furthermore, do_home() and do_end() use xplustabs() instead of
      placewewant again when calculating the leftedge, since placewewant
      refers to a column that may or may not be available (if it's not,
      the cursor will be placed wrongly).  Make get_edge_and_target() use
      xplustabs() instead of placewewant for the same reason; this also lets
      us simplify get_edge_and_target(), since xplustabs() will never be
      greater than strlenpt().  Finally, since do_end() now has to calculate
      rightedge as well as rightedge_x, use the former to implement the same
      time-saving optimizations as in do_home().
      
      The cursor is not yet adjusted when we try to go directly to a column
      past the end of a softwrap breakpoint, and placewewant handling in the
      vertical movement code is not yet adjusted for varying chunk lengths,
      but fixes for these are forthcoming.
      
      This fixes https://savannah.gnu.org/bugs/?49440.
      8490f4ac