Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 12-15-2017, 07:45 PM   #1
Katsunami
Grand Sorcerer
Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.
 
Katsunami's Avatar
 
Posts: 5,964
Karma: 32193615
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
Katsunami is offline   Reply With Quote
Old 12-15-2017, 10:29 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 33,618
Karma: 10209576
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
kovidgoyal is offline   Reply With Quote
Old 12-16-2017, 02:26 PM   #3
Katsunami
Grand Sorcerer
Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.
 
Katsunami's Avatar
 
Posts: 5,964
Karma: 32193615
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.
Katsunami is offline   Reply With Quote
Old 12-16-2017, 10:26 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 33,618
Karma: 10209576
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.
kovidgoyal is offline   Reply With Quote
Old 12-16-2017, 10:45 PM   #5
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 22,273
Karma: 22142024
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: K4NT, Galaxy Tab A
Multi line indent is a Blockquote
theducks is online now   Reply With Quote
Old 12-17-2017, 03:24 PM   #6
Katsunami
Grand Sorcerer
Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.Katsunami ought to be getting tired of karma fortunes by now.
 
Katsunami's Avatar
 
Posts: 5,964
Karma: 32193615
Join Date: Mar 2008
Device: KPW1, KA1
Quote:
Originally Posted by kovidgoyal View Post
That's not a bug, there is no multi-line indent capability in the editor.
OK, thanks. Good to know
Katsunami is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Viewer Plugin] Get selected text on right click. jverrone3 Development 1 03-27-2015 11:57 PM
How to register a plugin to viewer selected text context menu? Gerbrand Development 2 05-04-2014 02:24 PM
Hyperlink removes selected text DrChiper Editor 28 03-21-2014 01:02 PM
Feature Request: number of selected items Giuseppe Chillem Calibre 9 05-26-2013 08:46 AM
Touch Found a bug when deleting books Nietzsche Kobo Reader 3 03-02-2012 12:53 AM


All times are GMT -4. The time now is 07:57 PM.


MobileRead.com is a privately owned, operated and funded community.