mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Edit book: Fix option to disable showing the character before cursor not working
This commit is contained in:
parent
ac35a5bddc
commit
8039327eda
@ -188,13 +188,13 @@ class CursorPositionWidget(QWidget): # {{{
|
|||||||
self.la.setText('')
|
self.la.setText('')
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
name = unicodedata.name(character, None) if character else None
|
name = unicodedata.name(character, None) if character and tprefs['editor_show_char_under_cursor'] else None
|
||||||
except Exception:
|
except Exception:
|
||||||
name = None
|
name = None
|
||||||
text = _('Line: {0} : {1}').format(line, col)
|
text = _('Line: {0} : {1}').format(line, col)
|
||||||
if not name:
|
if not name:
|
||||||
name = {'\t':'TAB'}.get(character, None)
|
name = {'\t':'TAB'}.get(character, None)
|
||||||
if name:
|
if name and tprefs['editor_show_char_under_cursor']:
|
||||||
text = name + ' : ' + text
|
text = name + ' : ' + text
|
||||||
self.la.setText(text)
|
self.la.setText(text)
|
||||||
# }}}
|
# }}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user