-
Notifications
You must be signed in to change notification settings - Fork 63
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
OCGV - Fixes OutputMode Single #107
Conversation
Co-Authored-By: Tyler James Leonhardt <tylerl0706@gmail.com>
I see a couple changes from the other PR. Can you rebase? |
@@ -27,7 +27,7 @@ public HashSet<int> Start(ApplicationData applicationData) | |||
_applicationData = applicationData; | |||
_gridViewDetails = new GridViewDetails | |||
{ | |||
// If we have an OutputMode, then we want to make them selectable. If we make them selectable, | |||
// If OutputMode is Multiple, then we make items selectable. If we make them selectable, | |||
// they have a 8 character addition of a checkbox (" [ ]") that we have to factor in. | |||
ListViewOffset = _applicationData.OutputMode != OutputModeOption.None ? 8 : 4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't you need to change this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The spacing is correct for both Single
and Multiple
modes now (we are now using Terminal.Gui
's AllowsMultipleSelection
feature.
the comment is not quite right. I'll fix it.
I don't know why anyone would use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR fixes #23 and #79 for
ocgv
. It is dependent on PR #106.Previously
-OutputMode Single
worked exactly like-OutputMode Multiple
which was a bug. With this PR all three modes (None
,Single
, andMultiple
) work correctly:None - No marking of items is possible. ENTER does nothing. ESC cancels.
Single - No marking of multiple items is possible. Single selection 'mark UI' is shown. SPACE selects a single item. NTER selects the selected item and it is returned. ESC cancels.
Multiple - Marking of multiple items is possible with Multiple selection 'mark UI' using SPACE. ENTER returns selected items. ESC cancels.
Closes: Out-ConsoleGridView -OutputMode Single - cannot select anything #79