12-15-2017, 06:45 PM | #1 |
Grand Sorcerer
Posts: 6,111
Karma: 34000001
Join Date: Mar 2008
Device: KPW1, KA1
|
[Bug (or feature?)] Deleting Selected Text
Hi
Maybe this has always been as it is now, and I've never noticed it for some reason. The case is this: If I select text in the code view of the editor, and then try to delete it with backspace, it is not always deleted: in one case, the text is unindented. The behavior is as such: Select unindented text from left to right (cursor ends after selection) press Backspace: text is deleted. Select unindented text from right to left (cursor ends before selection), press Backspace: text is deleted. Select _indented_ text from left to right (cursor ends after selection), press backspace: text is deleted. Select _indented_ text from right to left (cursor ends before selection), press Backspace: text is unindented one step, and not deleted. Is this bolded behavior as it should be, or should the text be deleted? (If I could have a choice, I'd prefer to see it deleted, as that is what I'm trying to do.) I'm running calibre 3.14 on Windows 10, completely up to date. edit: I just thought of something... if I would really _want_ to unindent selected text by one step, I'd press SHIFT+TAB, so I tried this. In this case however, the editor deletes the text and doesn't unindent. That doesn't feel right. Hope to be of some help; if you need more information, please ask |
12-15-2017, 09:29 PM | #2 |
creator of calibre
Posts: 43,776
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
As far as I know, it has always been like that. backspace with the cursor before the first char on an indented line unindents. I agree its a bit odd to do that when there is selected text, which is easily fixed.
https://github.com/kovidgoyal/calibr...29e00147a466b4 |
Advert | |
|
12-16-2017, 01:26 PM | #3 |
Grand Sorcerer
Posts: 6,111
Karma: 34000001
Join Date: Mar 2008
Device: KPW1, KA1
|
Thanks
Will this also fix the bug with the TAB and SHIFT+TAB keys? If I select some text and then press TAB to indent all of it, it indents only the line where the cursor is at the beginning. If the cursor is at the end of a line, the editor replaces the entire selected text with one TAB. Same for SHIFT+TAB; it either unindents one line, or removes the selection. |
12-16-2017, 09:26 PM | #4 |
creator of calibre
Posts: 43,776
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
That's not a bug, there is no multi-line indent capability in the editor. Personally, I rely on a combination of beautify and automatic indentation when pressing enter. I never feel the need to indent particular lines.
|
12-16-2017, 09:45 PM | #5 |
Well trained by Cats
Posts: 29,689
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Multi line indent is a Blockquote
|
Advert | |
|
12-17-2017, 02:24 PM | #6 |
Grand Sorcerer
Posts: 6,111
Karma: 34000001
Join Date: Mar 2008
Device: KPW1, KA1
|
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Viewer Plugin] Get selected text on right click. | jverrone3 | Development | 1 | 03-27-2015 10:57 PM |
How to register a plugin to viewer selected text context menu? | Gerbrand | Development | 2 | 05-04-2014 01:24 PM |
Hyperlink removes selected text | DrChiper | Editor | 28 | 03-21-2014 12:02 PM |
Feature Request: number of selected items | Giuseppe Chillem | Calibre | 9 | 05-26-2013 07:46 AM |
Touch Found a bug when deleting books | Nietzsche | Kobo Reader | 3 | 03-01-2012 11:53 PM |