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.

Extend selection is broken

See original GitHub issue

Hey,

Extend selection feature seems broken, which makes me think the parser is bugged? I’d assume this feature works OOTB in Intellij based on parsing.

Example:

module Foo where

foo :: IO ()
foo = putStrLn ("Foo")

bar :: Int
bar = 42

Put your cursor somewhere on the string "Foo" and use Extend selection 3 times. It should select ("Foo") but instead it selects "Foo") i.e. not the left parenthesis. Do it another time: it should select putStrLn ("Foo") but instead it selects the whole line foo = putStrLn ("Foo").

Now put your cursor on putStrLn and extend selection 3 times. This should select putStrLn ("Foo") but instead selects putStrLn (. Extend selection again: this selects putStrLn ("Foo" which doesn’t make any sense.

By the way the same kind of issues happens on types (e.g. the line foo :: IO ()).

Last issue: put your cursor on 42 and extend selection 4 times. I think it would make sense to select all functions but not imports/module declaration, just like in Java once you extended to the class, it doesn’t select yet imports/package declaration.

Besides Extend selection feature being broken, I’m wondering if it’s not just the tip of the iceberg of broken parsing. This may lead to other bugs/issues?

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
sir4ur0ncommented, Apr 24, 2019

The behavior seems a lot better, however it’s still weird/bugged for parenthesis.

Using the same example file as in my original issue:

  • Put your cursor on string Foo
  • Extend selection 3 times: it selects "Foo") (note the opening parenthesis is not selected!)
  • Extend selection 1 time: it selects ("Foo") as you would expect on the previous step.

I think after 3 selection extensions, it should select ("Foo"), i.e. be symmetrical on parenthesis.

0reactions
rikvdkleijcommented, Jun 21, 2020

To solve this issue properly the parser has to be changed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Extend Selection for Excel 2013 is not working at all - F8 is not
I am hoping someone can help me. I am use to using F8 to select cells and the toggle key is not working....
Read more >
How to Extend a Selection in Microsoft Excel
3. Hold "Shift" and press the arrow keys to extend the selection with your keyboard.
Read more >
Basic expand selection funcionality is broken #17793 - GitHub
When cursor is placed in the middle of the string and you start expanding selection from there, list('abcd') does not ever get select...
Read more >
Extend selection keyboard shortcut not working
The correct shortcut is displayed in the ReSharper > Edit menu ("Extend Selection Ctrl+Alt+Right Arrow"), and the menu item itself correctly ...
Read more >
Excel: Toggling Extend Selection Mode On or Off (F8) - YouTube
Excel Tutorial #111: Toggling Extend Selection Mode On or Off (F8)In this Excel tutorial we're going look at a series of Microsoft Excel ......
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