1. 28 Feb, 2017 4 commits
    • David Lawrence Ramsey's avatar
      speller: fix replacing marked text in the alternate spell checker · 234bd9c9
      David Lawrence Ramsey authored
      With read_file() revamped, it now uses partition_filestruct() indirectly
      via ingraft_buffer(), so we can't use partition_filestruct() to replace
      marked text in the alternate spell checker anymore without segfaulting.
      
      Add the new function replace_marked_buffer() to accomplish this instead.
      Based on replace_buffer(), it uses extract_buffer() to throw away the
      marked un-spell-checked text, and then uses read_file() to insert the
      spell-checked text at the position where the mark was.
      
      Accordingly, remove unneeded partitioning and related stuff from
      do_alt_speller().  Besides pasting the file into the buffer at
      current[current_x], ingraft_buffer() also deals with renumbering,
      updating totsize, and handling a magicline, so do_alt_speller()
      doesn't need to do those anymore.
      234bd9c9
    • David Lawrence Ramsey's avatar
    • David Lawrence Ramsey's avatar
      weeding: remove partitioning and related stuff from do_insertfile() · ef43ebfe
      David Lawrence Ramsey authored
      With read_file() revamped to handle inserting a file at the current
      position, partitioning the buffer is no longer needed.
      ef43ebfe
    • David Lawrence Ramsey's avatar
      files: revamp the insertion of a file, to be more like pasting text · 86f7bc18
      David Lawrence Ramsey authored
      Move buffer handling and '\r' stripping from read_line() to read_file(),
      so that the file gets its format determined and gets stored in its own
      buffer entirely in one function.  Then use ingraft_buffer() to insert
      this new buffer into the current one.
      
      In addition to pasting the file at current[current_x], ingraft_buffer()
      also deals with renumbering, the updating of totsize, and the handling
      of a magicline, so read_file() doesn't need to do those anymore.
      
      Note that all this makes read_file() depend on the position of
      current[current_x] to know where to insert the file.  Accordingly,
      set current_x to zero in initialize_buffer_text() instead of in
      make_new_buffer(), so that replace_buffer() keeps working properly.
      86f7bc18
  2. 27 Feb, 2017 2 commits
  3. 26 Feb, 2017 2 commits
  4. 25 Feb, 2017 4 commits
  5. 24 Feb, 2017 10 commits
  6. 23 Feb, 2017 1 commit
  7. 22 Feb, 2017 2 commits
  8. 21 Feb, 2017 1 commit
  9. 17 Feb, 2017 6 commits
  10. 16 Feb, 2017 3 commits
  11. 14 Feb, 2017 1 commit
  12. 13 Feb, 2017 4 commits