aboutsummaryrefslogtreecommitdiff
path: root/view.c
AgeCommit message (Collapse)AuthorFilesLines
2015-10-20view: ensure minimal window sizeMarc André Tanner1-0/+4
Do not create empty windows, more importantly do not overwrite random memory. Closes #80
2015-10-15ui: cleanup redrawingMarc André Tanner1-1/+1
2015-10-14view: cleanup whitespace replacement symbol handlingMarc André Tanner1-31/+27
2015-10-14view: cleanup option handlingMarc André Tanner1-0/+8
2015-10-14ui: refactor syntax style definitionsMarc André Tanner1-9/+10
Styles can now be specified as strings which will make them easier to specify from outside the editor. The following style attributes can be given in a comma separated list: bold italics underlined fore:color back:color where color is either a hex value of the form #aabbcc or one of the predefined colors: black red green yellow blue magenta cyan white
2015-08-06vis: implement gv to restore last selectionMarc André Tanner1-2/+24
2015-08-01view: hide API to free main cursorMarc André Tanner1-1/+2
2015-07-31vis: cleanup handling of charwise/linewise motionsMarc André Tanner1-7/+13
Also text objects in visual mode should now work better.
2015-07-28vis: use multiple cursor/selection infrastructureMarc André Tanner1-0/+11
This commits introduces the following keybindings, in normal mode: CTRL-N select word the cursor is currently over, switch to visual mode CTRL-P remove least recently added cursor ESC if a selection is active, clear it. Otherwise dispose all but the primary cursor. In visual mode: CTRL-N create new cursor and select next word matching current selection CTRL-X clear (skip) current selection, but select next matching word CTRL-P remove least recently added cursor
2015-07-28vis: ESC in normal mode clears all cursorsMarc André Tanner1-2/+10
2015-07-28vis: add per cursor registersMarc André Tanner1-0/+6
2015-07-28text: move utility functions to separate fileMarc André Tanner1-0/+1
2015-07-26view: use a mark to keep track of the visible areaMarc André Tanner1-2/+10
This should fix "corruptions" caused by wrong offsets when editing the same file in multiple windows.
2015-07-26view: do not set cursor position after resizeMarc André Tanner1-1/+0
The problem is that a cursor movement might cause a redraw which in turn causes the sidebar width to change thus the view to be resized which will override the cursor position.
2015-07-26view: always fill out complete cell matrixMarc André Tanner1-12/+17
2015-07-26vis: add infrastructure to support multiple cursors/selectionsMarc André Tanner1-179/+410
This cleans up the existing selection handling code and adds the necessary bits to eventually support multiple cursors/selections. The cursor position is kept track of using marks, which means retrieving the cursor position is no longer a constant time operation. Furthermore the terminal cursor is no longer used, instead the whole window is redrawn after every cursor movement.
2015-07-21ui: further separate curses related user interface codeMarc André Tanner1-5/+5
By now ui-curses.[hc] are the only files dealing directly with curses related functions. Integration of a proper mainloop is still pending.
2015-07-07view: properly NUL terminate whitespace replacement symbolsMarc André Tanner1-3/+3
This should not be a problem in practice, since cell->data is large enough anyway.
2015-07-06Make selection contiguous over whitespace symbolsMarc André Tanner1-2/+3
2015-07-06Move filename from Text to FileMarc André Tanner1-2/+0
Also apply syntax rules every time the file name changes.
2015-07-03Fix handling of multibyte characters (at start of display area)David B. Lamkins1-1/+3
Previously a sequence of Unicode REPLACEMENT CHARACTER was displayed. Use an explicitly initialized mbstate_t object in the call to mbrtowc(). While this should not strictly be necessary, it works around a bug in certain implementations. Closes #56.
2015-07-03Add :show command to display special symbols for whitespacesMarc André Tanner1-16/+78
Enable/disable by setting to 0/1 respectively: :set show spaces=0 tabs=0 newlines=1
2015-06-30Perform character prev/next movements based on Text not ViewMarc André Tanner1-40/+0
While it is slower, it allows to move to characters which are currently not visible. This will be handy when experimenting with multiple cursors.
2015-06-30Cleanup insert/replace mode input handlingMarc André Tanner1-74/+6
View should only display the file content, but not modify it.
2015-04-22Rename window.[ch] to view.[ch]Marc André Tanner1-0/+898