-
-
Notifications
You must be signed in to change notification settings - Fork 247
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
Rewritten text selection #3166
Rewritten text selection #3166
Conversation
Hey there! Thanks for helping Mudlet improve. 🌟 Test versionsYou can directly test the changes here:
No need to install anything - just unzip and run. |
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.
It is virtually impossible to review this PR on-line here on GitHub unfortunately as it is very difficult to pick out the actual changes. It will need some git jiggery-pokery to revise the PR so that the noise (possibly from EOL-conversions?) can be filtered out - I don't have the time this week so if someone else wants to jump in before I can get to it, please do so...
We know it is the /n/r /r/n /n /r differences between dos and unix. |
Since both the last text selection diff, and the patch 1 diff are both on dos style files, you can view all the differences associated with the scroll bar problem (issue #612) easily. I pasted an image into discord as well - it's a total of 4 line additions. |
Nobody needs to recode Git; it already has a solution to this: https://help.github.com/en/github/using-git/configuring-git-to-handle-line-endings You just need to use a desktop client to make use of it :) That said, it's also not helping anything when everyone jumps straight on commenting about the like endings or how messed up the PR is... it does say "First time contributor", please respect that. |
…o deleted 6 lines which were commented out.
@CriusMacOldenly Is the split screen broken for you also? See in https://streamable.com/jycjg how it shows / goes away / shows when I scroll up. It should only show once you scroll up and not hide/show as you're scrolling up more. |
I have reviewed your screenshot video, and this problem is reported as "Issues with the scrolling handler #3054". My fix does not fix Issue#3054, and does not attempt to fix Issue#3054. As such, I would expect your reported problem to exist with my code as well. Testing my code does not show any unexpected behaviour, such as fixing Issue#3054. |
I keep looking at your video, and I am never seeing the scrollbar disappearing. :( I have watched your video to the end about 10-15 times during my tests, and I can't see anything unexpected or incorrect in your video. I need a better description of the problem you are seeing. |
…es text selection, and scroll bar changes are in a separate branch.
Please see existing Mudlet - yes, people like it that way |
…u needed to move the mouse to select the line(s).
I have implemented all changes per your request. |
Thanks for taking your time to do these improvements! :) |
I can confirm both problems I mentioned are gone, will test more 🔨 |
Thank you, that is kind of you. |
(use the clang-format tool with the .clang-format file at the root of the repository for this)
Can you check if ctrl+dragging still selects lines? |
I've fixed the CodeFactor issues, they were mostly just style ones. |
I was told to ignore the CodeFactor issues. It seems I was given incorrect instructions. :( |
ctrl+dragging does not select lines. This is strange since I know it used to... before I made the ctrl click selecting a line without movement. :( |
I don't know who gave them, but I don't think it was anyone on the core team. That said we are experimenting with it, it's not always right, and we're tweaking settings - in this case it was right :) Yes, I think the ctrl+click (which we do need) broke it |
I commented out the newly added ctrl-click code, and ctrl drag selection works perfectly. So, the newly modified code broke ctrl drag. |
Crius MacOldenly10/15/2019 s/Mud/Game10/15/2019 This is the advice I went by. |
After staring at the code a long time, I was finally able to sledge hammer the code into shape. |
Can confirm that works. Wider testing is blocked by a regression, but I fixed that in #3212, so as soon as we merge that in (probably today) more people can test this again. It's looking good! |
For some reason if you click inside the main window (where the text is) while said window is out of focus, it will automatically highlight the nearest character to wherever the mouse is. There is no mouse drag happening, it just highlights a character upon click when the window is brought into focus. |
This is happening with every out of focus click in my text selection version. |
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.
Alright, something we can look at in another PR, maybe something you can help with @CriusMacOldenly?
This one is good to go, thanks so much for working on it!
It'll have to be a different PR since it looks like you merged this PR now. |
Yes this PR is closed. You can delete your branch. Any new PR would again stem from development then. edit: No, you can't delete your branch, because you never made one before starting this PR. Instead you worked on your development branch. That seems a bit unusual, because it makes it harder to be working on different PRs simultaneously. |
* Improved text selection. Unhighlighting ctrl selects still broken. * Removed the commented code. * Removed the commented out code. * Uploaded to wrong place. * Uploaded to wrong place. * Re-save with Unix line endings * Same for the header * Commented out more code to fix all known text selection and highlighting problems. * This fixes Mudlet#612 . * Altered unhighlight() y1 declaration and assignment as requested. Also deleted 6 lines which were commented out. * Removed all the scrollbar changes for issue Mudlet#612. This now only handles text selection, and scroll bar changes are in a separate branch. * Fixed drawing highlight box for double clicking a word. * Altered ctrl click to select line on single ctrl click (Previously you needed to move the mouse to select the line(s). * Unix line endings again * Raise code to formatting standard (use the clang-format tool with the .clang-format file at the root of the repository for this) * Fixed ctrl-drag selection. Ensured ctrl-click selection worked too. * Unix line endings
Brief overview of PR changes/additions
commented out the old code regarding text selection, put in my own code for text selection.
Motivation for adding to Mudlet
existing text selection annoyed me as I was trying to copy and paste from mudlet into discord/notepad
Other info (issues closed, discussion etc)
Most of the old code is now commented out. I didn't know if I should remove it completely or not.
The logic of text selection has changed extensively.
I left in place existing code I thought was really poorly written, so it looks like fewer changes.
If you use ctrl to highlight some text, mudlet only deletes the highlight from the sections that would have been selected if you weren't pressing ctrl.
Fix #3064