aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-01-10text: introduce text_bytes_alloc0 utility functionMarc André Tanner2-0/+15
Heap allocates a zero terminated string of the given range. Freeing is the caller's responsibility. Checks for unsigned integer overflow i.e. passing SIZE_MAX as len will always fail because there is no room for the terminating NUL byte. This is important as EPOS is defined to be SIZE_MAX.
2016-01-10text-motion: fix integer overflow in text_search_{forward,backward}Marc André Tanner1-6/+6
2016-01-09vis-open: Fix indentationMichael Reed1-3/+3
It was hard to read with everything on the same indentation level.
2016-01-09Merge branch 'vis-open' of https://github.com/Pyrohh/vis into masterMarc André Tanner1-2/+2
2016-01-09vis-open: Print error message to stderrMichael Reed1-1/+1
2016-01-09vis-open: Use basename of $0 in usage messageMichael Reed1-1/+1
If vis-open is placed in a user's PATH and executed then $0 will be vis-open's absolute path: $ vis-open -h usage: /usr/local/bin/vis-open [-h] [-p prompt] [file-pattern] This isn't very pretty, so use basename(1) on $0: $ vis-open -h usage: vis-open [-h] [-p prompt] [file-pattern]
2016-01-09Makefile: Use $(MAKE) instead of directly calling `make`Michael Reed1-11/+11
This is basically the same as b18acc1.
2016-01-06vis: make <C-v> also available at :-command promptMarc André Tanner1-1/+1
2016-01-06vis: apply <C-v> to all cursors not only primary oneMarc André Tanner1-5/+2
2016-01-06vis: enhance <C-v> to recognize a few special keysMarc André Tanner1-28/+58
Up until now <C-v> in insert/replace mode would only recognize numeric codes in various formats. This commits adds support for a few special keys such as <Enter> or <Tab>.
2016-01-02lexer: sync with upstream scintillua rev bdb74a2f31dfMarc André Tanner102-113/+493
2015-12-31Add explicit build commands to READMEMarc André Tanner1-0/+4
2015-12-31view: fix regressionMarc André Tanner1-1/+3
This reverts 2f4b69cc67e8863e5789817ed5097158e6163621. There are likely still some problems left when editing the end of a file at end of the visual area.
2015-12-31Also remove vis-open when uninstallingMarc André Tanner1-0/+1
2015-12-31Add section about Lua API to READMEMarc André Tanner1-0/+39
2015-12-31vis-lua: implement vis.events.{start,quit} eventsMarc André Tanner1-2/+11
2015-12-31vis-lua: implement window.cursor.{line, col, pos}Marc André Tanner1-0/+57
These are currently read-only properties.
2015-12-31vis-lua: implement vis.lines[..] arrayMarc André Tanner1-14/+90
This allows access to specific lines of a file, array indicies/line numbers are 1 based. Read access is supported for [1, #lines] while assigning to the 0 element will insert a new line at the beginning of the file. Similarly assigning to lines[#lines+1] will add a new line at the end of the file. The returned lines will not contain any line termination characters.
2015-12-31text: let text_pos_by_lineno return EPOS if given a too large line numberMarc André Tanner1-1/+1
2015-12-31text: introduce text_newline_insertMarc André Tanner2-0/+13
2015-12-31vis-lua: implement vis.open(filename)Marc André Tanner1-0/+12
2015-12-31vis-lua: rename a few functionsMarc André Tanner1-35/+50
2015-12-31vis-lua: remove unnecessary castsMarc André Tanner1-8/+8
2015-12-29#111 command line prompt options defaultsErlend Fagerheim1-10/+14
2015-12-29lexer: add some meta data to newly added lexersMarc André Tanner4-3/+6
2015-12-29vis: fix default lua package.path and support $XDG_CONFIG_HOMEMarc André Tanner2-14/+23
The ordered list of paths for startup and lexer files is: - $VIS_PATH/{,lexers} - $XDG_CONFIG_HOME/vis/{,lexers} (defaulting to $HOME/.config/vis/{,lexers}) - /usr/local/share/vis/{,lexers} - /usr/share/vis/{,lexers} - package.path (standard lua search path)
2015-12-29Clean up build systemMarc André Tanner3-47/+41
2015-12-29view: improve cursor handling at end of fileMarc André Tanner1-1/+1
Holding down <Backspace> at the end of the file should not keep the cursor on the middle line of the window.
2015-12-29view: fix new line handling at the end of visible areaMarc André Tanner1-1/+1
The last new line is added to the cell matrix but failure is reported to indicate that there is no space left for further characters.
2015-12-29view: fix view [start,end] range calculationMarc André Tanner1-1/+1
This for example now correctly displays tab characters at the very start of the visible area.
2015-12-28Update READMEMarc André Tanner1-287/+272
2015-12-26vis: move file type detection to visrc.luaMarc André Tanner3-120/+128
2015-12-26vis: change Lua package.path to also include vis base directoryMarc André Tanner1-8/+12
2015-12-26vis: refactor Lua integrationMarc André Tanner13-273/+746
Lua support can now be disabled at compile time using: $ make CONFIG_LUA=0 This commit also adds an initial Lua API and provides a few default hooks. We now also require Lua >= 5.2 due to the uservalue constructs. In principle the same functionality could be implemented using function environments from Lua 5.1.
2015-12-26Initialize enum values to the public API onesSilvan Jegen1-2/+2
2015-12-20vis: fix forceful redraw <C-l>Marc André Tanner5-1/+13
2015-12-20Make normal mode 'S' behave like in VimSilvan Jegen1-1/+1
2015-12-03lexer: add lexer for FaustDavid B. Lamkins2-0/+58
Faust is a DSP (digital signal processing) programming language. See http://faust.grame.fr/ Closes #125
2015-12-02vis: make <C-w>w an alias for <C-w>jMarc André Tanner1-0/+1
2015-11-28vis: add namespace prefix for MARK_SELECTION_{START,END}Marc André Tanner4-12/+12
2015-11-28vis: do not switch to normal mode when leaving ? and / promptMarc André Tanner1-1/+1
2015-11-28view: remove ViewEvent infrastructureMarc André Tanner5-28/+5
The only used event handler was used to update the '< and '> marks which is now taken care of by the leave handler of the visual modes.
2015-11-28vis: improve switching to prompt modeMarc André Tanner4-14/+26
A call to vis_prompt_show will now automatically switch to prompt mode. Within the prompt leave/enter handlers the focused window (vis->win) will still point to the document window not the one referring to the prompt. The selection marks '< and '> are now only updated when a visual mode is left.
2015-11-28vis: implement = operator in terms of fmt(1)Marc André Tanner2-0/+7
2015-11-28vis: add cmd argument to VIS_OP_FILTERMarc André Tanner4-8/+34
2015-11-28view: preserve column position when moving across linesMarc André Tanner1-8/+18
2015-11-28view: remove special treatment of tabs in cell matrixMarc André Tanner2-10/+3
2015-11-27vis: improve cursor alignment command <C-a>Marc André Tanner3-6/+22
2015-11-27vis: improve creation of new cursors on line above/belowMarc André Tanner1-6/+6
Use view cell matrix data to create the cursors on more appropriate positions. Closes #108
2015-11-27vis: implement filter operator !Marc André Tanner6-5/+33
It currently works by switching to visual mode and then opening the command prompt with a default range which refers to the currently active selection.