Open core-ai-bot opened 3 years ago
Comment by redmunds Thursday Mar 06, 2014 at 22:47 GMT
if the last line of the file is empty, then there's no way to delete it at the end of a block selection using Delete Line
It seems to work on Win7. I start with a file with the following contents:
1
2
3
4
5
Results: Last 3 lines are deleted
Am I missing something?
Comment by njx Thursday Mar 06, 2014 at 23:19 GMT
If I follow those steps on this branch, the last (blank) line is still at the end of the file (the new line 4 is blank). Tried it on Windows and it's the same.
Comment by njx Thursday Mar 06, 2014 at 23:28 GMT
Yeah, that issue is introduced by this fix in order to keep the behavior consistent in all cases. Easy enough to add a special case if people find it annoying.
Issue by njx Thursday Mar 06, 2014 at 21:41 GMT Originally opened as https://github.com/adobe/brackets/pull/7111
@
redmunds - as I mentioned in email, this case is already fixed in the cmv4 version of the fix (so when I merge this over into cmv4 I'll just ignore this change, but keep the new unit test).Note that there's an edge case of this edge case which is arguably still wrong :) - if the last line of the file is empty, then there's no way to delete it at the end of a block selection using Delete Line. I could imagine we add that as a special case - though it seems inconsistent, it might match what the user's intent usually is in this case. Let me know what you think.
njx included the following code: https://github.com/adobe/brackets/pull/7111/commits