File is not always scrolled to the correct line number [Command Line]


Version: 0.84.0
OS: OSX 10.9.2


When opening a file with the command line utility and passing the line number (e.g. atom path/to/file.ext:123) the file is opened, but the file is not scrolled to the given line. This only occurs when the line number is beyond the lines visible when scrolled to the top of the file.

When this happens a caret appears at the beginning of the file. However, the active cursor is at the beginning of the given line. Navigating with the keyboard or typing immediately after the file is opened causes the scroll jumps to its proper place, and text insertion or cursor movement occurs from the given line.

In some cases this problem does not occur and the file is opened and scrolled to the correct line. I have been unable to determine which conditions trigger this.

URL Helper à la "atom://"

The Factor programming language uses the open + seek to line feature, e.g. atom math.factor:40 for seeking to specific Factor code.

The problems I see with it right now are:

  1. If the file is open, atom gets the focus, but the cursor does not move and the view pane does not scroll.

  2. If the file is closed, atom opens the file and moves the cursor to the correct line. However, the view pane does not scroll to that line.

Without fixing these two issues, atom is a real pain to use when editing Factor.

This is for version 0.91. Thanks!


The v command in less also passes the current line number to the configured editor ($VISUAL or $EDITOR) via +[number] e.g. $VISUAL +17 foo.txt.