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

sbp_kill_region with "is_copy" not always removing region #196

Open
Remillard opened this issue Feb 24, 2020 · 6 comments
Open

sbp_kill_region with "is_copy" not always removing region #196

Remillard opened this issue Feb 24, 2020 · 6 comments

Comments

@Remillard
Copy link

I haven't been able to nail this down further just yet, but there's been a behavior that's happening with increased frequency and it's a little weird.

  1. I drop mark (ctrl space) and then move the cursor down a few lines. I have the visual highlighting on, so it'll show the lines being embraced by the mark and the point.
  2. I hit copy region to the kill ring (M-w).
  3. Here's the strange part. The mark and point region remains. Normally the region will deselect at this point.
  4. I yank (C-y) and the copied text is printed.

This is intermittent, and usually closing Sublime and reopening it will make the part where region deselects happen correctly. And it does appear as if the text is getting copied to the kill ring. Just requires an extra step to kill the region (C-g or ESC) which can be awkward.

I'll try to file more information as it becomes available.

@canoeberry
Copy link
Collaborator

canoeberry commented Feb 24, 2020 via email

@Remillard
Copy link
Author

Yowza. Yes, I do that a LOT. Usually I'm in VHDL and sometimes up in the declaration region and sometimes down in the code body region.

I just tried and couldn't get the bug to reproduce but that's not too unusual. It's kind of intermittent, but again if it's due to view state then it could be very particular. I'll make a note to try to notice the state of multiple views next time it occurs.

@Remillard
Copy link
Author

Okay, I managed to get a version of this bug to pop. In this instance I was using kill-region instead of copy region. I'm going to copy the window -- I don't have a way to animate this but I think it's effective enough.

So there's only one file in the 2nd view, and it's not the one I'm editing. You can see I've region selected from line 53 down to to line 60. What I want to do is delete these lines, and I usually use kill for this. So I'm typing C-w to kill these lines to the kill-ring. After I noticed that the region wasn't disappearing, I opened the Sublime window and issued the log commands. I wanted to make sure it was running the correct command. I went back to the window I was editing and hit C-w a few more times and you can see it's running sbp_kill_region. However the region remains marked (and notably isn't getting killed).

You can't see this next bit because of lack of animation, but as noted it was running sbp_kill_region. I moved to a blank section of that file and did a yank C-y. It did NOT yank the text that I was attempting to kill. So unlike my example above it was not actually killing to the kill-ring. There are no other error messages so that's about as far as I can go.

I hope this helps and hope the screenshot helps.

image

@Remillard
Copy link
Author

Another couple of tidbits that may or may not be relevant:

  1. I had forgotten this but I had a second Sublime window open behind this one where it had a package settings side-by-side view open.
  2. After I closed Sublime, restarted the program and went to the project (so the workspace is identical to the above), I issued C-w and it deleted the region, and then a C-y yanked it correctly elsewhere.

I guess all I can say here is that I did not have multiple views into the same buffer, but I did have two windows open (however the buffer was only in one view in one window -- that other one was a settings window).

@canoeberry
Copy link
Collaborator

This sounds very weird, and very different to what I am wrestling with. And yes, I am still wrestling with it but I think I cracked it today. Still playing around with it to see if I get any surprises ...

I will try to look at this in the coming days. I am super busy ... Cheers for paying enough attention for this detailed report.

@canoeberry
Copy link
Collaborator

Hi - sorry for all the time that has gone by. Day job, etc.

I just released a new version. Some things have changed, including some things a lot.

Do you want to see if this is still an issue?

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

No branches or pull requests

2 participants