LogtalkDotOrg / logtalk-for-vscode

Logtalk for VSCode extension
MIT License
5 stars 0 forks source link

Typing _ before an atom clobbers the atom #6

Closed unthingable closed 3 months ago

unthingable commented 3 months ago

To reproduce:

  1. Given editor text foo(Bar), place cursor before B
  2. Type _
  3. foo(Bar) becomes foo(_)

Expected: foo(Bar) becomes foo(_Bar).

pmoura commented 3 months ago

Fixed in 99325a7ff4436388d220949f8b65662d5d4756aa. This was a "feature" inherited from the original author of the extension, meant to replace a variable with an anonymous variable. But as implemented it also affected atoms. As users often write named anonymous variables instead of just _, this feature usefulness is rather limited and its behavior unexpected and annoying outside this single usage case.

unthingable commented 3 months ago

Many thanks. Seeing mentions of parentheses in the commit I wonder if that also fixes the deindent upon ), another annoying heritage.

pmoura commented 3 months ago

Please fill a separated issue for the de-indentation issue you mentioned with details on how to reproduce.