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

Bookmarks no longer move with line moves #2785

Closed
reagle opened this issue Apr 8, 2019 · 17 comments
Closed

Bookmarks no longer move with line moves #2785

reagle opened this issue Apr 8, 2019 · 17 comments

Comments

@reagle
Copy link

reagle commented Apr 8, 2019

Description

Confirmed, and copying from forum:

I think I found a small bug with bookmarks and moving lines using the keyboard shortcuts ctrl + shift + up.

Steps to reproduce

  1. create a new file
  2. put about 8 new lines in there
  3. move cursor to line 4
  4. create a bookmark using [ctrl + f2] (can now see bookmark icon in left gutter on line 4)
  5. with your cursor on the bookmarked line, move the line up using [ctrl + shift + up]
  6. The bookmark icon moves down to line 5 while cursor moves up to line 3.

I guess this also led me to find another small issue. I can’t seem to move up the last line in a file or move the next-to-last line down to the last space.

Expected behavior

Bookmark should move with line

Actual behavior

Bookmark remain behind

Environment

MacOS Mojave; ST v 3.2 build 3200

@reagle
Copy link
Author

reagle commented May 21, 2019

Still present in 3207.

@FichteFoll
Copy link
Collaborator

FichteFoll commented May 21, 2019

For me, the bookmark actually moves down when I move the current line with the selection upwards using the binding. When the swap is initiated on the adjacent line, it works as intended.

Regarding the thing at the end of the file, we have a separate issue for that already and I don't think it's related. I can't find it right now, however.

@reagle
Copy link
Author

reagle commented May 21, 2019

Thanks for the confirm. BTW: It's a small bug, but is it "minor"? It's keeping me at 3188.

@FichteFoll
Copy link
Collaborator

Comparatively, I classify this as a minor invonvenience, almost trivial, but I didn't go that far because I don't use bookmarks myself.

Severity is a subjective metric based on how much it affects daily usage and how many users. "minor" is the default classifcation.

@kaste
Copy link

kaste commented May 21, 2019

This is a prominent regression for SublimeLinter. It is not only that bookmarks behave differently, all drawn regions are affected. (Didn't comment before just subscribed to get notified about the progress.)

SublimeLinter does not have or ship a workaround yet.

@reagle
Copy link
Author

reagle commented May 21, 2019

@kaste Is there a SublimeLinter issue yet? I was going to cross-ref but didn't immediately see anything.

@kaste
Copy link

kaste commented May 21, 2019

No issue yet, for a proper issue I need to screencast etc. and I actually hoped it would just go away quickly bc it's a regression. 🤷‍♀

@FichteFoll
Copy link
Collaborator

FichteFoll commented May 22, 2019

All right, if this happens for all regions added via add_regions, I'll raise the severity. Although severity is always a hot topic. Also you're right and this is definitely a regression.

@reagle
Copy link
Author

reagle commented May 23, 2020

A year later and nothing? Dare I hope for persistent, working bookmarks in ST4?

@deathaxe
Copy link
Collaborator

Seems to work as expected in ST 4074. Don't know the exact built it was fixed by, though.

Animation

@deathaxe deathaxe added this to the next dev cycle milestone May 24, 2020
@ghost
Copy link

ghost commented May 24, 2020

There's still a scenario where even persistent bookmarks can be lost: apply bookmarks in ST, close the file, commit it to a Git repo, edit the file online, pull back changes, reopen it in ST.
I think many users just lost interest in bookmarks, over years of malfunctioning.

@deathaxe
Copy link
Collaborator

How should ST keep track of bookmarks if the file was changed externally while not open in ST?

From the editor's point of view the reopened file is a new one because the content changed. How should it know, whether the old bookmarks would still be at the correct/expected line?

Sounds a bit like expecting magic.

@ghost
Copy link

ghost commented May 24, 2020

I call it heuristics. Bookmarks based on line, column and surrounding text, saved locally to disk.
Anyway, it's 2020. I would expect a little bit of magic by now. =]

@reagle
Copy link
Author

reagle commented May 25, 2020

My priority is a fix of the regression, hopefully addressing @FichteFoll's linting issue as well. It'd then be magical to have persistent bookmarks at all -- no need for out-of-editor magic.

I don't know how people work without bookmarks, i.e., bouncing back and forth between a few interdependent pieces of code/prose.

@reagle
Copy link
Author

reagle commented Aug 20, 2020

BTW: Has anyone tried the dev build version available via discord?

@kaste
Copy link

kaste commented Aug 20, 2020

@deathaxe tried. My issue was also solved.

@BenjaminSchaaf
Copy link
Member

Fixed in Sublime Text 4.

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

No branches or pull requests

5 participants