* 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 support for ~username syntax (fix#1033)
* Fixed return string
Also removed non-descriptive variable name `foo`
* moved err declarations outside of if statement
The -l flag to the replace command means "literal" and will treat
the search term literally instead of as a regular expression.
The command bar also now supports expanding environment variables
and running expressions through the shell and using the result
in the command.
* corrected spelling error and missing public function comments
* check for readonly and if true do not insert character
* mouse middle click checks for view type readonly and does not paste if view is readonly
* check for view readonly with binding keys and if readonly do not change the content.
This option makes micro treat spaces at the beginning of lines as if
they are tabs. This option only does anything if tabstospaces is already
on. E.g. micro will move over 4 spaces at once when at the start of a
line.
Closes#616
Closes#270
CtrlU to toggle recording and CtrlJ to playback.
You can also rebind using the "ToggleMacro" and "PlayMacro"
actions.
Note that recursive macros are not yet supported.
This adds the `savecursor` option which will remember where the cursor
was when the file was closed and put it back when the file is opened
again. The option is off by default so that people aren't confused as to
why the cursor isn't at the start of a file when they open it.
This commit also adds a more general ability to serialize a buffer so
various components can be saved (which could also be useful for persistent
undo).
Fixes#107