1. 24 Jul, 2016 1 commit
  2. 16 Jul, 2016 1 commit
  3. 13 Jul, 2016 2 commits
  4. 12 Jul, 2016 2 commits
  5. 03 Jul, 2016 1 commit
    • Benno Schulenberg's avatar
      tweaks: rename a variable to be more accurate · 528b79b5
      Benno Schulenberg authored
      When we get a ^J as verbatim input, it is not possible to include it
      into the file buffer or the prompt answer, because this would mean
      adding an encoded null to the buffer or answer, and that is not what
      the user intended.  One option would have been to simply ignore a ^J
      in verbatim input.  But the choice has been made to act the same way
      as when the ^J (0x0A) is found in the file data: start a new line.
      
      That is the same response as to the Enter key, yes -- but the code
      for the Enter key is ^M (0x0D), not ^J.  So, to be more precise,
      rename the relevant variable from 'got_enter' to 'got_newline'.
      528b79b5
  6. 29 Jun, 2016 1 commit
  7. 27 Jun, 2016 2 commits
  8. 25 Jun, 2016 1 commit
    • Benno Schulenberg's avatar
      tweaks: try to distinguish between keystrokes and characters · ddd9c7a0
      Benno Schulenberg authored
      Keystrokes are single integers (aided by the flags meta_key and
      func_key) but in the input stream they can be encoded as escape
      sequences (a series of bytes).  Characters are values in byte
      range, but in UTF-8 one character can consist of multiple bytes.
      
      Also rename two variables, because the secondary input buffer
      that they refer to contains only characters (mostly just one),
      never any shortcuts; and there are too many "kbinput" already.
      ddd9c7a0
  9. 23 Jun, 2016 1 commit
  10. 22 Jun, 2016 1 commit
  11. 21 Jun, 2016 1 commit
  12. 20 Jun, 2016 2 commits
  13. 15 Jun, 2016 1 commit
  14. 14 Jun, 2016 1 commit
    • Benno Schulenberg's avatar
      input: don't allocate too much, and don't move too many · 7165bd5c
      Benno Schulenberg authored
      To add a character, one does not need to allocate twice its size.
      And the amount to be moved does not depend on the size of the new
      character; it just needs to include the terminating zero.
      
      (This fixes in do_output() the same logical mistakes that were fixed
      in do_statusbar_output() last February, in acf19bde and 7c0e4333.)
      7165bd5c
  15. 13 Jun, 2016 1 commit
  16. 12 Jun, 2016 1 commit
  17. 30 May, 2016 1 commit
  18. 27 May, 2016 2 commits
  19. 25 May, 2016 1 commit
  20. 22 May, 2016 1 commit
  21. 21 May, 2016 1 commit
  22. 18 May, 2016 1 commit
  23. 16 May, 2016 2 commits
  24. 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
  25. 01 May, 2016 1 commit
  26. 25 Apr, 2016 3 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
    • 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
  27. 17 Apr, 2016 1 commit
  28. 12 Apr, 2016 1 commit
  29. 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
  30. 07 Apr, 2016 1 commit
  31. 05 Apr, 2016 1 commit
  32. 29 Mar, 2016 1 commit