question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to select multiple lines

See original GitHub issue

It’s not possible to select more than one editor block (e.g. paragraph).

Further issues:

  • Ctrl+A select just one block
  • Unable to select soft-lines with Shift and arrow keys

Block backport of https://github.com/marktext/marktext/pull/2835 and https://github.com/marktext/marktext/pull/2853, if needed.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
fxhacommented, Feb 9, 2022

if you select a text from starting from | in foo to | in bar, it will select the two paragraphs, and highlight the two paragraphs, not only the oo\nbar, and not the whole document too.

I always wondered whether this behavior was expected in Notion and rather thought of a bug because it’s not intuitive for a text editor. It feels very pain if you think about Office 365 or Google Docs, but you are restricted to edit only within a block/line. I would expect that many user would be unhappy with this change because editing will come more restricted. What’s the core issue to forbid this? Why couldn’t we update the page selection from the internal cursor that is counted forward/backwards on arrow key input and mouse movement?

0reactions
Jocscommented, Feb 7, 2022

I don’t really understand this. You mean that a user can only select text within a block or all blocks with “select all”?

Maybe my statement wasn’t clear enough, for example, if you select a text from starting from | in foo to | in bar, it will select the two paragraphs, and highlight the two paragraphs, not only the oo\nbar, and not the whole document too.

<mark>f|oo

ba|r</mark>

zar

Another example, it will select the two list items if foo and bar are two list items in the same list.

<mark>- f|oo
- ba|r</mark>
- zar

We will find the nearest common ancestor of the two selection blocks(anchor block and focus block), and then select all blocks between these two blocks under this ancestor.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot select non-contiguous text with the keyboard
To select multiple areas that aren't next to each other, make your first selection, hold down CTRL, and then select any other items...
Read more >
Unable to select multiple lines of text off-screen (solved)
First, set caret (blinking text cursor) at the position where selection should start, for example line 1000 column 1. Then use the vertical ......
Read more >
Solved: Why can't I select multiple lines or objects anymore?
The only way to select more than one line for a command is to hold down the shift button and then select more...
Read more >
Can't select multiple lines in VSCode web #109243 - GitHub
Steps to Reproduce: Open VSCode web (Codespaces) on iPadOS; Try selecting multiple lines of codes either with fingers or magic trackpad. cc @ ......
Read more >
Cannot select multiple items in a dropdownlist - Stack Overflow
This would occur if you had two items in the DropDownList with the same Value .
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found