]> git.lizzy.rs Git - micro.git/commitdiff
More fixes for parsecursor
authorZachary Yedidia <zyedidia@gmail.com>
Sat, 30 May 2020 16:23:29 +0000 (12:23 -0400)
committerZachary Yedidia <zyedidia@gmail.com>
Sat, 30 May 2020 16:23:29 +0000 (12:23 -0400)
Fixes #1695
Fixes #1696

cmd/micro/micro.go

index b3a3aa49022f6923c91960f63c6d2e9789351479..69962b628f05de085902fd066773fd818850b4c5 100644 (file)
@@ -45,7 +45,7 @@ func InitFlags() {
                fmt.Println("    \tCleans the configuration directory")
                fmt.Println("-config-dir dir")
                fmt.Println("    \tSpecify a custom location for the configuration directory")
-               fmt.Println("[FILE]:LINE:COL")
+               fmt.Println("[FILE]:LINE:COL (if the `parsecursor` option is enabled)")
                fmt.Println("+LINE:COL")
                fmt.Println("    \tSpecify a line and column to start the cursor at when opening a buffer")
                fmt.Println("-options")
@@ -171,7 +171,7 @@ func LoadInput() []*buffer.Buffer {
                                screen.TermMessage(err)
                                continue
                        }
-                       flagStartPos = buffer.Loc{col, line - 1}
+                       flagStartPos = buffer.Loc{col - 1, line - 1}
                } else if len(match) == 3 && match[2] == "" {
                        line, err := strconv.Atoi(match[1])
                        if err != nil {