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

[vdobj] give each thread its own activeCommand #2345

Merged
merged 4 commits into from
Mar 22, 2024

Conversation

midichef
Copy link
Contributor

Closes #2266.

a simple repro for #2266: open a large sheet and delete a large number of rows:
seq 1222333 |vd then gs gd U. The rows don't come back.

def activeCommand(self, value):
self.setThreadActiveCommand(threading.current_thread(), value)

def setThreadActiveCommand(self, thread, value):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If no one else uses this function, let's merge it into the activeCommand setter.

Copy link
Contributor Author

@midichef midichef Mar 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's the only place it was used. I left the thread-specifying setter there in case we wanted to call it explicitly in _with_active_cmd for clarity. Because as I have it now, it is a bit strange to see cmd = vd.activeCommand and then, two lines later if cmd: vd.activeCommand = cmd.

I've merged it.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see what you mean. We'll add a comment there referring to this issue/PR.

Copy link
Owner

@saulpw saulpw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this all makes sense to me. If it fixes the issue and seems to work otherwise, we'll take it.

@anjakefala anjakefala merged commit 581cdf1 into saulpw:develop Mar 22, 2024
13 checks passed
@midichef midichef deleted the active_command branch March 23, 2024 01:41
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

Successfully merging this pull request may close these issues.

[undo] can't undo some threaded commands
3 participants