Skip to content

Opening file in sublime from command line with line and column numbers places caret in incorrect location when line contains tabs #3039

@nedwardsnae

Description

@nedwardsnae

Description

The command line functionality for opening a file at a particular line and column number doesn't work as expected when opening on a line with tab indentation.

Steps to reproduce

  1. Record the line and column number of your caret on a line in a file containing a tab character, making sure that this is somewhere after the tab character (end of line demonstrates this best). Sublime's line/column number functionality in the bottom left of the UI can be used to get this info.
  2. Open sublime at the desired location using the command line 'subl filename:linenum:colnum'
  3. Observe that the tab is treated as a single character when opening the file in this way, and the caret is now 3 characters ahead of the desired location.

Expected behavior

That sublime opens up with the caret in the location that the UI reports it should be in.

Actual behavior

Sublime opens up with the caret having overshot, potentially onto a new line.

Environment

  • Build: 3211
  • Operating system and version: Windows 10 1903

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions