* Added syntax highlighting for ATS
* Fixed "////" comment not working as intended
Added a hack to make it impossible to match the end of the comment
* Fixed typo, added '#' and '@' as symbols
* Refactored cursor location login into a function. Fixed buffer overflow when line position is 1 more than file lines
* Fixed crash when -startpos has an invalid argument
* Adapted tests to new interface
* Fixed bug where -startpos with lines 0 and 1 would both be on the first line
* Changed Fatalf format back to digits
* Fixed issues with buffer cursor location. Added tests for new function
* ParseCursorLocation will now return an error when path doesnt contain line/col
* Fixed off-by-one line error
* Fixed tests to account for subtracting 1 from the line index
* Now can open Windows full-path from command line arg
Example that now works: micro.exe D:\myfile.txt
* Now correctly retrieves the path from the input path string. Except for single-letter filenames
* Fixed line/cols, need to make the code prettier
* Fixed path matching with regex by @Pariador
* Fixed not stripping the line/col args from file path
* Added tests for ParseCursorLocation
* add binding for more primitive backspace
* support selecting page up and page down
* fix matchbraceleft for braces that start on x=0
* fix multiline copy-paste indenting
let's say you have two lines like
<space><space>line1
<space><space>line2
so you start from cursor x=0 and select both lines, then paste.
we don't want any leading whitespace in this case, because the
cursor is already at x=0 and the selection already includes
whitespace.
* Make ^X act like ^K when nothing is selected
^K is hard to reach with your left hand or requires to use both hands
Also with this you could remove ^K whatsoever and make room for a different command
This is how I configured nano by the way
Line duplication also becomes nearly instantaneous with a flash-quick ^X+^V+^V combo (nano doesn't have a dedicated shortcut)
Small block (5-10 lines) cuts/copies/duplicates can also be made this way
* Remove unnecessary lines
* Call CutLine the right way
by default home sends the cursor to the beginning of the line.
if the cursor is at the beginning of the line already though, home
will send the cursor to the first non-whitespace rune. tapping home
will toggle between these two line starts.
* Add support for ~username syntax (fix#1033)
* Fixed return string
Also removed non-descriptive variable name `foo`
* moved err declarations outside of if statement
this behavior, while slightly less obvious, allows for observing what brace you
just closed. as you write closing braces, the brace you closed gets highlighted