aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-09-19Windows style newlines are actually \r\n not \n\rMarc André Tanner5-22/+23
This is fiddely stuff, hopefully it doesn't break too much
2014-09-19Implement expand tab functionality, make tabwidth configurableMarc André Tanner6-4/+68
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-18Fix :0 on command prompt to move to begin of fileMarc André Tanner1-1/+1
2014-09-18Cleanup handling of action.countMarc André Tanner1-12/+11
If no multiplier is given action.count is zero. This fixes 1G vs G.
2014-09-18Ignore tab key in command prompt for nowMarc André Tanner2-1/+3
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-18Display error messages when loading a file failsMarc André Tanner1-15/+18
2014-09-18Clean up window splitting APIMarc André Tanner3-54/+75
2014-09-17Update README with current operator supportMarc André Tanner1-3/+1
2014-09-17Implement left shift operatorMarc André Tanner2-0/+30
2014-09-17Implement right shift operatorMarc André Tanner2-0/+26
2014-09-17Simplify text_object_line implementationMarc André Tanner1-7/+1
2014-09-16Fix scrolling direction of CTRL-{F,B}Marc André Tanner1-2/+2
2014-09-16This 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
2014-09-16Fix compilation on OpenBSDGregor Best1-0/+2
Signed-off-by: Gregor Best <gbe@unobtanium.de>
2014-09-16Fix editing of files with length 0Gregor Best1-3/+5
Signed-off-by: Gregor Best <gbe@unobtanium.de>
2014-09-16Implement CTRL-{U,D,E,Y} in normal modeMarc André Tanner4-40/+72
2014-09-16Clean up cursor handling in window.[ch]Marc André Tanner2-68/+107
2014-09-16Import syntax rules from sandyMarc André Tanner3-25/+184
2014-09-15More efficient syntax highlighting, first match winsMarc André Tanner5-34/+51
2014-09-14Display current mode in window statusbarMarc André Tanner2-11/+14
For now just display the modes which start with '-'. I want to keep the descriptive names of the other modes available for debugging purposes.
2014-09-14Fix save to absolute pathsMarc André Tanner1-9/+14
The save logic still needs changes to restore file permissions, ownership (if run as root) etc.
2014-09-14Add a dummy man page inorder to fix make installMarc André Tanner1-0/+16
2014-09-14Make byte based iterator API handle the whole range [0, size]Marc André Tanner2-6/+34
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-14Use EPOS where appropriateMarc André Tanner1-4/+4
2014-09-14All *_free(...) functions should accept a NULL argumentMarc André Tanner2-0/+4
2014-09-14Fix clang static analyzer warningsMarc André Tanner3-10/+22
2014-09-13Rename OP_PASTE to OP_PUTMarc André Tanner2-5/+5
2014-09-13Introduce some helper functions dealing with FilerangeMarc André Tanner5-21/+36
2014-09-13Rename text_insert_raw to text_insertMarc André Tanner5-12/+7
2014-09-13Introduce and use EPOS instead of (size_t)-1Marc André Tanner5-19/+21
2014-09-13Make window_selection_get to return the correct rangeMarc André Tanner1-1/+5
This makes the operator operate on the correct file range if executed from visual mode. The problem is that if the cursor is visible the selection seems larger than it actually is. The cell under the cursor is actually not part of the selection eventhough it is visually indistinguishable from it. The somewhat hacky way around this is to hide the cursor once selection is active and show it again once the selection is cleared. This will probably cause a headache if the cursor needs to be visible while a selection is active like for example in the command prompt.
2014-09-13Add a READMEMarc André Tanner1-0/+518
This is for now just a mail originally sent to the suckless mailing list.
2014-09-13Fix 'G' movement to end of fileMarc André Tanner1-1/+1
action.count is 1 by default. notice that this breaks 1G which should move to the first line / start of file.
2014-09-13Add movements 'H', 'M', 'L'Marc André Tanner4-0/+36
H moves to the n-th window line from top M moves to the middle window line L moves to the n-th window line from bottom
2014-09-13In normal mode 'r' should also replace new linesMarc André Tanner1-1/+2
2014-09-12Cleanup editor.hMarc André Tanner1-5/+5
2014-09-12Display a few error messages where appropriateMarc André Tanner1-5/+19
2014-09-12Use the new global keypress hook to hide user messagesMarc André Tanner1-3/+20
2014-09-12Add a global keypress hook before any keybindings are checkedMarc André Tanner1-0/+5
If the registered function returns false, completely ignore the key.
2014-09-12Add facility to display a message to the userMarc André Tanner2-1/+33
2014-09-12Add some more API commentsMarc André Tanner1-2/+7
2014-09-12Make sure that the state is consistent after an undo operationMarc André Tanner1-0/+2
When performing an undo operation, further changes should not be accounted to the then active action. Therefore take a snapshot which resets txt->current_action to NULL.
2014-09-12Remove outdated commentsMarc André Tanner1-2/+0
2014-09-12Fix loading of not yet existing filesMarc André Tanner1-1/+4
2014-09-12Introduce text_filename_setMarc André Tanner2-2/+8
This can be used to associate a given filename to a currently unnamed text.
2014-09-12Rename text_filename to text_filename_getMarc André Tanner5-6/+6
2014-09-12Restore cursor position after an undo/redoMarc André Tanner4-16/+33
2014-09-12Name modes more consistentlyMarc André Tanner1-35/+40
2014-09-12Take snapshot when leaving insert/replace modeMarc André Tanner1-0/+12
Make sure we are able to restore text to whatever state was when we left insert / replace mode after an editing operation.