Skip to content

Add to Favorites - selection mode - add /m /-m #282

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

Closed
ProgerXP opened this issue Feb 29, 2020 · 6 comments
Closed

Add to Favorites - selection mode - add /m /-m #282

ProgerXP opened this issue Feb 29, 2020 · 6 comments
Assignees

Comments

@ProgerXP
Copy link
Owner

Add two new radio buttons to #249:

  • Fi&rst substring
  • Las&t substring

They create an LNK like Current line/selection but using either /m or /m- switch. Because Windows command-line quoting rules are strange, these radio buttons are disabled if any of this is met:

  • rectangular selection
  • empty selection
  • selection contains " or non-printable symbols (such as line breaks)
  • selection is too long

You can determine more limitations on last two points.

@cshnik
Copy link
Collaborator

cshnik commented Mar 3, 2020

Done.

@cshnik cshnik assigned ProgerXP and unassigned cshnik Mar 3, 2020
@ProgerXP
Copy link
Owner Author

ProgerXP commented Mar 3, 2020

(wcspbrk(lpParams->pszCurrentSelection, L" \t\r\n\"") != NULL))

No need to forbid the space - simply wrap the parameter in ". As for \t - yes, it's invalid, I doubt LNKs can handle it.

@cshnik
Copy link
Collaborator

cshnik commented Mar 3, 2020

Fixed. Space character is now allowed.

@cshnik cshnik assigned ProgerXP and unassigned cshnik Mar 3, 2020
@ProgerXP ProgerXP closed this as completed Mar 8, 2020
@ProgerXP
Copy link
Owner Author

  1. Make radio buttons' click area last until the end (see how it's done in Windows, e.g. Folder options in Explorer).
  2. Update radio button texts to this:
"&First line"
"L&ast line (/g -1)"
"&Current line (/g)"
"Current &selection (/gs)"
"Fi&rst substring (/m)"
"Las&t substring (/m-)"

@ProgerXP ProgerXP reopened this Mar 27, 2020
@ProgerXP ProgerXP assigned cshnik and unassigned ProgerXP Mar 27, 2020
@cshnik
Copy link
Collaborator

cshnik commented Mar 30, 2020

Done.
However even M$ violates this layout "rule"
image

@cshnik cshnik assigned ProgerXP and unassigned cshnik Mar 30, 2020
@ProgerXP
Copy link
Owner Author

However even M$ violates this layout "rule"

They may be sloppy about precise area length but at least in general they make all checkboxes wider than their text.

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

2 participants