Double clicking code sometimes select the whole line (2021b?)

15 views (last 30 days)
Hi, I've recently upated to Matlab 2021b and this has been bothering me for a while. Typically in text editors, double-clicking some word will select the whole word, and that is also true of Matlab. However, it appears that the recent Matlab update implemented some sort of full-line selection with conditions that are rather obscure and it feels to me like bad UX.
Not gonna lie, this is rather annoying and it makes me want to roll back the update as it does disrupt my train of thoughts as I code. From what I observed, if you have already selected a whole word with a double-click, and then you double-click another different word, then the next word you double-click will select the full line instead of only the word that was clicked.
A use case that annoys me a lot is when I'm copying a piece of code and replacing a variable with a different variable name in multiple locations by Ctrl-V'ing the variable name to the new locations. Then it'll select the whole line and I'll erase the entire line of code as I press Ctrl-V, ending up frustrated.
Is there a fix for this? Maybe a setting I can deactivate? And no, I don't want automatic replacing of variable names in my codes; thanks.

Answers (2)

Pranjal Kaura
Pranjal Kaura on 29 Dec 2021
Hey Fernando,
Thank you for bringing this up. I have heard that this issue is known and the corresponding parties are investigating it further and will try to fix it in future releases.

Akash Singh
Akash Singh on 8 Dec 2021
Double click selects the word.
Triple click selects the line, this change has been implemented in MATLAB 7.9 (R2009b) in order to allow a line of code to be selected, dragged, and inserted in a new position in a MATLAB file.
  2 Comments
Alex Chang
Alex Chang on 3 Jun 2022
Still appears to occur in Matlab 2022a - is a very agitating (I presume) bug.
Running on Ubuntu 16.04 LTS. Can confirm this behavior does not occur in other text editors, only the Matlab GUI.

Sign in to comment.

Categories

Find more on Environment and Settings in Help Center and File Exchange

Products


Release

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by