brackets-archive / bracketsIssues

Archive of issues in brackets.
0 stars 0 forks source link

[CLOSED] Inline editor incorrectly updates visual range when preceding line is deleted #491

Open core-ai-bot opened 3 years ago

core-ai-bot commented 3 years ago

Issue by jasonsanjose Tuesday Mar 27, 2012 at 22:28 GMT Originally opened as https://github.com/adobe/brackets/issues/493


  1. Open this project https://gist.github.com/b045aac6ba362b4f0974
  2. Open index.html and open an inline editor at <div>
  3. Open styles.css
  4. Place cursor at line 4, Shift+ArrowDown, then delete to fully delete line 4 and the trailing line break

Observe the inline editor for styles.css is hiding the first line of the CSS rule. Also Editor._visibleRange returns [5,6] instead of [4,6]. See xit test in InlineEditorProviders-test "should sync deletions from the full editor and update the visual range of the inline editor"

core-ai-bot commented 3 years ago

Comment by peterflynn Wednesday Mar 28, 2012 at 00:48 GMT


I believe this is the issue that user story task 2.6 is meant to address ("Handle edge case where entire rule or beginning of rule is deleted")

core-ai-bot commented 3 years ago

Comment by njx Thursday Mar 29, 2012 at 00:43 GMT


Yup. Fixing as part of 2.6. To be clear, the "fix" is to collapse the inline editor, rather than to update its visible range. I'll update the unit test.

core-ai-bot commented 3 years ago

Comment by njx Thursday Mar 29, 2012 at 00:51 GMT


Hmmm, actually, this is a real bug that won't be fixed by my fix. The issue is that even though the deletion crosses over onto the first line, it isn't deleting any content from that line (just the newline before it), so we should just fix up the start of the range. I'll fix it during this task.

core-ai-bot commented 3 years ago

Comment by peterflynn Friday Mar 30, 2012 at 23:18 GMT


Fixed by pull #508

core-ai-bot commented 3 years ago

Comment by jasonsanjose Thursday Apr 05, 2012 at 21:41 GMT


Confirmed fixed. Inline editor now closes when deleting this range.