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

Implements opening from clipboard as discussed in issue #205 #208

Merged
merged 2 commits into from
Dec 21, 2020

Conversation

eteran
Copy link
Owner

@eteran eteran commented Dec 19, 2020

Ctrl+Shift+Y Now will open what is in the copy buffer of the clipboard, which works well for platforms that don't support cross-application selection primary selection buffers.

@anjohnson
Copy link
Contributor

I built the open-from-clipboard branch but the key combo doesn't seem to do anything, is there meant to be an entry for it on the File menu?
image

@eteran
Copy link
Owner Author

eteran commented Dec 21, 2020

No menu entry, it should just work. Did you try with Ctrl instead of Cmd? Maybe only menu entries get auto-converted?

@eteran
Copy link
Owner Author

eteran commented Dec 21, 2020

@tksoh BTW, I am loving your idea of putting the git branch, commit, etc in the version info! I didn't even have to ask to double-check that the correct branch was used here :-).

@eteran
Copy link
Owner Author

eteran commented Dec 21, 2020

@anjohnson any luck? It seems to work correctly locally.

@eteran eteran linked an issue Dec 21, 2020 that may be closed by this pull request
@anjohnson
Copy link
Contributor

I tried both Cmd+Shift+Y and Ctrl+Shift+Y, I confirmed that I had the right path by pasting into the current document then selecting it and using Cmd+Y which did work.

I do get a beep on Cmd+Shift+Y though, so I think MainWindow::action_Shift_Open_Selected() is being called.

Do you plan to add a menu item?

@eteran
Copy link
Owner Author

eteran commented Dec 21, 2020

Probably no menu item, yet. If you are getting a beep, then it likely thinks that the clipboard is empty. Are you sure you did a Cmd+C with some text highlighted somewhere first?

@eteran
Copy link
Owner Author

eteran commented Dec 21, 2020

Oh.... I see the problem... fix incoming :-P

@anjohnson
Copy link
Contributor

Building...

@eteran
Copy link
Owner Author

eteran commented Dec 21, 2020

OK, should work now!

Ironically, it was a C+P error. I based the code off of the normal action_Open_Selected ... which of course has code to check if your system supports selections! Since macOS doesn't, it was blocking the code from doing its thing :-P.

@anjohnson
Copy link
Contributor

Yay, success! A menu item would be nice eventually (to provide discoverability) and of course an entry in the Help docs, but you know all that...

Thanks!

@eteran
Copy link
Owner Author

eteran commented Dec 21, 2020

Merging!

@eteran eteran merged commit 3b4f4d6 into master Dec 21, 2020
@eteran eteran deleted the open-from-clipboard branch December 21, 2020 19:40
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.

Feature Request: Open from Clipboard
2 participants