atom / fuzzy-finder

Find and open files quickly
MIT License
276 stars 138 forks source link

Wrong hint when jumping to the column of a line #363

Closed jtagscherer closed 5 years ago

jtagscherer commented 5 years ago

Description

Since https://github.com/atom/fuzzy-finder/pull/360, the fuzzy finder allows users to jump not only to lines within files but also to columns within lines by using a second colon. Since https://github.com/atom/fuzzy-finder/pull/359, the hint in the finder's caption is correctly updated while jumping to lines. I implemented both of these pull requests simultaneously, and since I had no control over when they were merged, I unfortunately could not include jumping to columns within the hints.

In consequence, the hint in the finder view erroneously considers input with two colons invalid. This creates a bad user experience by harming the discoverability of the feature of jumping to columns. Not only does the finder not hint at the feature, but it actively discourages users from using the feature by displaying an error message.

bug

Steps to Reproduce

  1. Open any file with some content
  2. Open the fuzzy finder, e.g. by pressing CMD+P
  3. Insert a line and column separated by colons, e.g. :4:2

Expected behavior:

When entering a line and a column, the finder should display an appropriate hint, e.g. "Jump to position in active editor". If the part before the second colon is invalid, it should display "Invalid line number". If the part after the second colon is invalid, it should display "Invalid column number".

Actual behavior:

The hint does not differentiate between jumping to lines and columns. Even worse, it displays an error message when trying to jump to a column, even though the input is technically valid.

Reproduces how often:

Always.

Versions

Atom Version:

Atom    : 1.34.0
Electron: 2.0.16
Chrome  : 61.0.3163.100
Node    : 8.9.3

APM Version:

apm  2.1.3
npm  6.2.0
node 8.9.3 x64
atom 1.34.0
python 3.6.4
git 2.17.2

Operating System:

macOS Mojave (10.14.2)