Commit Graph

13 Commits

Author SHA1 Message Date
Dimitar Borislavov Tasev
aa74b1233c Fix -startpos flag being ignored (#1129)
* 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
2018-06-04 12:27:27 -04:00
Dimitar Borislavov Tasev
efe343b37c Allows opening files using full path on Windows (#1126)
* 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
2018-06-03 17:13:03 -04:00
Zachary Yedidia
0360a2fcb5 Improve cmdbar parsing and add -l replace flag
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.
2017-11-22 13:54:39 -05:00
boombuler
bc724bf781 fixes #379 (second try) 2016-09-28 21:54:34 +02:00
Florian Sundermann
d201e7c503 fixed directory completion on windows 2016-09-14 16:15:49 +02:00
Niklas Hennigs
956b1bdb3a Missed the test for the last commit, now fixed 2016-09-07 17:52:16 +02:00
boombuler
b2735d7b5b use build-in functions to quote / unquote 2016-09-03 12:02:49 +02:00
boombuler
8617ae5c1f keep trailing space at commandline 2016-09-03 08:16:18 +02:00
Florian Sundermann
ccfe08bc60 allow command parameters to be quoted
this way FileCompletions could contain space runes without
breaking the parameter.
2016-09-02 13:44:22 +02:00
Zachary Yedidia
59b7555f01 Fix various small details and update readme 2016-08-28 16:28:28 -04:00
Zachary Yedidia
8cef0abf6a Fix import error in tests 2016-08-28 13:45:38 -04:00
Zachary Yedidia
aa9dbdde3e Improve tab completion in command mode
Pressing tab when all suggestions start with the same substring
will insert that substring (this is how bash autocompletion works).
2016-08-28 13:05:07 -04:00
aerth
337f162360 now is go gettable and updated make file 2016-04-18 10:59:41 +00:00