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

Add GUI in preferences dialog for adding URI customized schemes #9195

Closed
wants to merge 2 commits into from

Conversation

donho
Copy link
Member

@donho donho commented Nov 22, 2020

Related: 5168bdb and #9155

and make naming conventional.
@chcg chcg added the enhancement Proposed enhancements of existing features label Nov 23, 2020
@donho donho requested a review from sasumner November 24, 2020 00:25
@donho donho changed the title Add default supported url schemes Add GUI in preferences dialog for adding URI customized schemes Nov 24, 2020
@donho donho closed this in 4b29971 Nov 25, 2020
@@ -849,7 +849,7 @@ struct NppGUI final
bool _isWordCharDefault = true;
std::string _customWordChars;
urlMode _styleURL = urlUnderLineFg;
generic_string _customizedShemes = TEXT("svn:// cvs:// git:// imap:// irc:// irc6:// ircs:// ldap:// ldaps:// news: telnet:// gopher:// ssh:// sftp:// smb:// skype: snmp:// spotify: steam:// sms: slack:// chrome:// bitcoin:");
generic_string _uriShemes = TEXT("svn:// cvs:// git:// imap:// irc:// irc6:// ircs:// ldap:// ldaps:// news: telnet:// gopher:// ssh:// sftp:// smb:// skype: snmp:// spotify: steam:// sms: slack:// chrome:// bitcoin:");
Copy link
Contributor

Choose a reason for hiding this comment

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

@donho Spelling _uriShemes -> _uriSchemes :-)

Copy link
Contributor

Choose a reason for hiding this comment

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

But you didn't change the spelling problem? :-)

@donho donho deleted the custom_url_gui branch December 4, 2020 18:03
@sasumner
Copy link
Contributor

sasumner commented Dec 11, 2020

@donho

Okay, so I didn't actually review the code so much as try out the feature.

Taking a cue from HERE (a user complaint about his custom linking behavior that used to work but is broken in 7.9.1), I recreated this user's setup on my system and tried to get it to work in the current (as of this writing) codebase.

I will report that I had success.

Summary:

I added this:
image

And after that I was able to achieve links in text such as these:
image
And then when clicking the links, the indicated files opened in Notepad++ for me.

I did notice that the links with pathnames must all contain forward slashes in order to be recognized as links, for example, this is NOT recognized as a link:
image

This is in contrast to earlier versions of N++ (I used 7.8.6) where backslashes WERE recognized, and mixed slashes as well, examples:
image

I suppose that I should add that, like the user with the complaint, I had the registry entries for "np" call a batch file (that handles stripping the np:// prefix, turn the forward slashes into backslashes, and replaces %20 with a space) which in turn calls notepad++.exe

@donho
Copy link
Member Author

donho commented Dec 16, 2020

@sasumner
It's about @Uhf7 's implementation of URI. As he has mentioned, it's impossible to manage all the custom URI format, so it's based on URL format - I agree with his choice.

@sasumner
Copy link
Contributor

I agree with his choice.

I agree also.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Proposed enhancements of existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants