aboutsummaryrefslogtreecommitdiff
path: root/editor.c
AgeCommit message (Collapse)AuthorFilesLines
2014-10-17Read stdin when given - as filenameMarc André Tanner1-0/+11
2014-09-25Actually set global tabwidthMarc André Tanner1-0/+1
2014-09-24Change split/vsplit APIMarc André Tanner1-22/+16
2014-09-22Add support for the '<', '>' marksMarc André Tanner1-2/+8
2014-09-19This fixes warning with latest glibc (>= 2.19.90), which deprecated _BSD_SOURCEChristian Hesse1-0/+1
warning: _BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE Commit 4f537d8e4bd9707a0048289f296510b76ce6d642 just fixed one of three cases. Fix the remaining.
2014-09-19Implement expand tab functionality, make tabwidth configurableMarc André Tanner1-0/+13
If expandtab is enabled then inserted tabs are replaced by tabwidth amount of spaces. Both settings apply to all windows files and can be changed via: :set tabwidth n # where 1 <= n <= 8 :set expandtab (1|yes|true)|(0|no|false)
2014-09-18Do only open an empty buffer if the file does not existMarc André Tanner1-1/+1
Opening a file without having read permissions should fail.
2014-09-18Clean up window splitting APIMarc André Tanner1-36/+45
2014-09-16Import syntax rules from sandyMarc André Tanner1-1/+4
2014-09-15More efficient syntax highlighting, first match winsMarc André Tanner1-7/+7
2014-09-14All *_free(...) functions should accept a NULL argumentMarc André Tanner1-0/+2
2014-09-14Fix clang static analyzer warningsMarc André Tanner1-2/+4
2014-09-13Rename text_insert_raw to text_insertMarc André Tanner1-2/+2
2014-09-13Introduce and use EPOS instead of (size_t)-1Marc André Tanner1-1/+1
2014-09-12Add facility to display a message to the userMarc André Tanner1-1/+28
2014-09-12Fix loading of not yet existing filesMarc André Tanner1-1/+4
2014-09-12Rename text_filename to text_filename_getMarc André Tanner1-2/+2
2014-09-12Restore cursor position after an undo/redoMarc André Tanner1-1/+2
2014-09-11Add :edit commandMarc André Tanner1-0/+23
2014-09-11Add :qall commandMarc André Tanner1-4/+5
2014-09-10Fix :q commandMarc André Tanner1-6/+8
2014-09-10Simplify drawing of the window statusbarMarc André Tanner1-7/+3
2014-09-10Simplify cursor color managementMarc André Tanner1-1/+71
2014-09-09Remove trailing whitespaces (sed 's/[ \t]*$//')Marc André Tanner1-2/+2
2014-09-09Rename vis.[ch] to editor.[ch] and main.c to vis.cMarc André Tanner1-0/+483
2014-09-01Refactor frontend codeMarc André Tanner1-1169/+0
window.[ch] now contains a somewhat generic editor window which is then enhanced in vis.[ch] with a statusbar.
2014-08-31First part of a vi like frontendMarc André Tanner1-0/+15
Still very incomplete
2014-08-25Move motion related stuff into own fileMarc André Tanner1-178/+27
2014-08-24Add work in progress editor frontendMarc André Tanner1-0/+1305
2014-08-14Rename files editor.[ch] -> text.[ch]Marc André Tanner1-1094/+0
2014-08-14Change 'namespace' Editor -> TextMarc André Tanner1-91/+91
2014-08-13Add search functionalityMarc André Tanner1-0/+81
2014-08-13Add support for file marksMarc André Tanner1-0/+18
2014-08-07Add function to query line-numer <-> byte offset mappingMarc André Tanner1-3/+113
2014-08-02Further improve iterator APIMarc André Tanner1-22/+56
- iterator_get now returns the correct piece - add utf8 aware methods to move by a character in either direction
2014-08-01Improve iterator APIMarc André Tanner1-45/+86
2014-07-22Reindent commentsMarc André Tanner1-8/+12
2014-07-22Perform argument validationMarc André Tanner1-4/+5
2014-07-22Rename content => dataMarc André Tanner1-41/+41
2014-07-22API cleanupMarc André Tanner1-23/+27
Add editor_{insert,replace}_raw and const modifiers where appropriate.
2014-07-22Rename Editor::pos -> Editor::lenMarc André Tanner1-15/+15
2014-07-22Refactor editor_saveMarc André Tanner1-10/+7
2014-07-22Add prototypesMarc André Tanner1-1/+15
2014-07-22Remove redundant functionMarc André Tanner1-18/+5
2014-07-22Remove unnecessary special case for inserting into an empty documentMarc André Tanner1-21/+7
2014-07-22Fix bugs in caching layerMarc André Tanner1-8/+27
Thw lenght of the whole text (ed->size) also has to be updated. Also do not allocate changes if the operations are performed in the cache.
2014-07-22Add some more commentsMarc André Tanner1-2/+26
2014-07-21Introduce cache layerMarc André Tanner1-27/+108
If multiple consecutive modifications happen to lie within the same piece perform the operations "in place". In particular no new pieces will be allocated if the changes occur at the end of the most recently modified piece. In this case the piece is simply extended. However changes in the middle of a piece involve memove(3) calls which might hurt performance. Since no new pieces are created the changes can't be undone on an individual basis. The frontend should therefore call 'editor_snapshot' at appropriate times inorder to invalidate the cache.
2014-07-21Add iterator functions to walk through textMarc André Tanner1-0/+51
2014-07-21Add comments regarding deletionMarc André Tanner1-1/+16