Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect jump location when selecting tag in line mode #327

Closed
sasensi opened this issue Apr 22, 2020 · 3 comments
Closed

Incorrect jump location when selecting tag in line mode #327

sasensi opened this issue Apr 22, 2020 · 3 comments
Labels

Comments

@sasensi
Copy link

sasensi commented Apr 22, 2020

Describe the bug
The cursor is placed in the wrong place after typing "FT" because a "T" tag exists and is assumed to be the target.

To Reproduce
Steps to reproduce the behavior:

  1. Open a file containing the following content:
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="theme-color" content="#000000" />
    <meta
      name="description"
      content="Web site created using create-react-app"
    />
    <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
    <!--
      manifest.json provides metadata used when your web app is installed on a
      user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
    -->
    <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
    <!--
      Notice the use of %PUBLIC_URL% in the tags above.
      It will be replaced with the URL of the `public` folder during the build.
      Only files inside the `public` folder can be referenced from the HTML.

      Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
      work correctly both with client-side routing and a non-root public URL.
      Learn how to configure a non-root public URL by running `npm run build`.
    -->
    <title>React App</title>
  </head>
  <body>
    <noscript>You need to enable JavaScript to run this app.</noscript>
    <div id="root"></div>
    <!--
      This HTML file is a template.
      If you open it directly in the browser, you will see an empty page.

      You can add webfonts, meta tags, or analytics to this file.
      The build step will place the bundled scripts into the <body> tag.

      To begin the development, run `npm start` or `yarn start`.
      To create a production bundle, use `npm run build` or `yarn build`.
    -->
  </body>
</html>
  1. Invoke AceJump in default mode
  2. Switch to end of line mode
  3. We want to go to the end of line 27 (<title>React App</title>) which has the label "FT"
  4. Type "FT"
  5. Cursor is unexpectedly placed at the end of the line 19 instead (Notice the use of %PUBLIC_URL% in the tags above.)

Expected behavior
Cursor should be placed at the end of line 27

Screenshots
https://youtu.be/KwgkOcL4-oI

Desktop (please complete the following information):

  • OS: Windows 10
  • IDE and version: PHPStorm 2020.1
  • AceJump version: 3.6.1

Additional context
The same issue happened to me several time in different contexts.

@sasensi sasensi added the bug label Apr 22, 2020
@yankolo
Copy link

yankolo commented May 15, 2020

I am also having the same error. It happens with "FT" when there is a "T" hint on screen. However, I don't know if it only happens with "FT" or with other hints.

Edit: It happens with any combination under similar circumstances (e.g. "JI" matches "I"). I noticed that this only happens when jumping to the beginning or the end of the line, not when jumping to normal characters.

breandan added a commit that referenced this issue Nov 19, 2020
@breandan breandan changed the title Wrongly jumps to tag "T" when typing "FT" Incorrect jump location when selecting tag in line mode Nov 30, 2020
@breandan
Copy link
Collaborator

breandan commented Apr 4, 2021

This should be fixed in 3.7.0. Feel free to give it a try and leave your feedback!

@breandan breandan closed this as completed Apr 4, 2021
@sasensi
Copy link
Author

sasensi commented Apr 4, 2021

I confirm that this is now fixed, thank you very much !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants