aboutsummaryrefslogtreecommitdiff
path: root/text.h
AgeCommit message (Collapse)AuthorFilesLines
2015-11-23text: introduce functions to iterate over graphemesMarc André Tanner1-1/+6
They currently consider any character for which wcwidth(3) return 0 as a combining character.
2015-10-22text: introduce text_appendf utility functionMarc André Tanner1-0/+1
2015-10-05text: add text_{v,}printf functionMarc André Tanner1-0/+3
Convenient way to insert formated data into a Text.
2015-08-08text: rename some functions to improve consistencyMarc André Tanner1-2/+2
2015-08-08text: introduce helper function text_delete_rangeMarc André Tanner1-0/+1
2015-07-28text: move utility functions to separate fileMarc André Tanner1-14/+0
2015-07-25text: add text_range_overlapMarc André Tanner1-0/+2
2015-07-22text: introduce text_range_newMarc André Tanner1-0/+3
2015-07-19vis: handle file truncation more gracefullyMarc André Tanner1-0/+3
If we use the file / virtual memory system as cache (using mmap(2)) and another process truncates the file we are editing, we have a problem. All we can do is catch the resulting SIGBUS, close the corresponding window and print a warning message. To test this use: $ dd if=/dev/zero of=TEST bs=8M count=1 $ vis TEST :! echo TRUNCATE > TEST
2015-07-19text: move regex related functions to separate fileMarc André Tanner1-9/+0
Eventually this should probably be rewritten to use an iternal regex engine, currently it has unacceptable memory usage, it copies the whole text.
2015-07-19text: slight cleanup, add a few commentsMarc André Tanner1-6/+34
2015-07-06Warn when saving a file which has been changed outside the editorMarc André Tanner1-0/+4
2015-07-06text: remove text_load_fd and text_fd_getMarc André Tanner1-4/+0
2015-07-06Move filename from Text to FileMarc André Tanner1-4/+0
Also apply syntax rules every time the file name changes.
2015-07-03Remove text dump debugging codeMarc André Tanner1-3/+0
Instead use the text-dump git branch if necessary.
2015-06-27Make :earlier and :later accept arguments similar to vimMarc André Tanner1-2/+8
Currently the following arguments are accepted: {count} Go to older text state {count} times. {N}s Go to older text state about {N} seconds before. {N}m Go to older text state about {N} minutes before. {N}h Go to older text state about {N} hours before. {N}d Go to older text state about {N} days before
2015-06-27Core undo tree changesRyan Chipman1-0/+2
2015-04-22Cleanup line ending type detection and insertionMarc André Tanner1-2/+9
2015-04-21Remove redundant RegexMatch definitionMarc André Tanner1-5/+1
2015-04-05Introduce new struct VisTextMarc André Tanner1-6/+0
This adds yet another layer of indirection and stores vi related stuff which is associated with a given text but shared among all windows displaying it (e.g. marks). This will also help if one wants to keep texts arround which aren't currently displayed.
2015-01-06Rudimentary change list (accessible via g; and g,)Marc André Tanner1-0/+3
2015-01-02Rip out insertion repeating infrastructureMarc André Tanner1-2/+0
2015-01-01Introduce externally managed marksMarc André Tanner1-0/+4
2015-01-01Rename mark related functionsMarc André Tanner1-5/+5
2014-12-23Fix compiler warningsMarc André Tanner1-5/+5
2014-10-25Introduce text_range_sizeMarc André Tanner1-0/+1
2014-10-25Support partial writesMarc André Tanner1-0/+1
2014-10-25Support partial savesMarc André Tanner1-0/+1
2014-10-25Change return type of text_saveMarc André Tanner1-1/+1
2014-10-17Make editor usable as a filter: echo foo | vis - | catMarc André Tanner1-1/+5
The terminal output is by default redirected to stderr, making stdout available for communications purposes. If a file is "opened" from stdin (i.e. vis is given '-' as argument) and a subsequent write without a filename is performed as in ":wq" the output is written to stdout.
2014-10-17Read stdin when given - as filenameMarc André Tanner1-0/+1
2014-09-28Make '.' repeat last insertionMarc André Tanner1-0/+2
2014-09-19Support files with Windows style newlines \r\nMarc André Tanner1-0/+2
2014-09-14Make byte based iterator API handle the whole range [0, size]Marc André Tanner1-1/+6
Before this commit the valid range was [0, size) which represents the file content. For the position at EOF (=size) a NUL byte is returned which is not actually part of the underlying file. This should fix various movements / editing operations at the end of the file. For example Ctrl+w at the end of the command prompt.
2014-09-13Introduce some helper functions dealing with FilerangeMarc André Tanner1-0/+4
2014-09-13Rename text_insert_raw to text_insertMarc André Tanner1-2/+1
2014-09-13Introduce and use EPOS instead of (size_t)-1Marc André Tanner1-1/+3
2014-09-12Introduce text_filename_setMarc André Tanner1-0/+2
This can be used to associate a given filename to a currently unnamed text.
2014-09-12Rename text_filename to text_filename_getMarc André Tanner1-1/+1
2014-09-12Restore cursor position after an undo/redoMarc André Tanner1-2/+4
2014-09-10If text has been created from an empty file, store filename upon first saveMarc André Tanner1-0/+1
2014-09-10Add comments where appropriateMarc André Tanner1-1/+1
2014-09-09Cleanup header filesMarc André Tanner1-0/+2
2014-09-08Hook up search as a movementMarc André Tanner1-2/+2
2014-09-08Unify variable namingMarc André Tanner1-7/+7
Only textual substitution no functional changes.
2014-08-25Move motion related stuff into own fileMarc André Tanner1-0/+11
2014-08-14Remove useless replace APIMarc André Tanner1-2/+0
The removed junk might not have the same length as the newly inserted one.
2014-08-14Rename files editor.[ch] -> text.[ch]Marc André Tanner1-0/+72