mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-29 14:22:42 +09:00
Switched to +LINE,COL
Previously the flag was parsed for `-cursor LINE,COL` However, emacs and nano both us `+LINE,COL` and this also makes it easier to ignore the `+` as a filename.
This commit is contained in:
@@ -89,9 +89,9 @@ func NewBuffer(txt []byte, path string) *Buffer {
|
||||
// Put the cursor at the first spot
|
||||
cursorStartX := 0
|
||||
cursorStartY := 0
|
||||
// If -cursor LINE,COL was passed, use start position LINE,COL
|
||||
if len(*flagLineColumn) > 0 {
|
||||
positions := strings.Split(*flagLineColumn, ",")
|
||||
// If +LINE,COL was passed, use start position LINE,COL
|
||||
if len(flagLineColumn) > 0 {
|
||||
positions := strings.Split(flagLineColumn[1:], ",")
|
||||
if len(positions) == 2 {
|
||||
lineNum, errPos1 := strconv.Atoi(positions[0])
|
||||
colNum, errPos2 := strconv.Atoi(positions[1])
|
||||
|
||||
Reference in New Issue
Block a user