We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cc9c4af commit dc866b7Copy full SHA for dc866b7
1 file changed
addon/globalPlugins/devBox/__init__.py
@@ -9,6 +9,7 @@
9
import scriptHandler
10
import speech
11
import textInfos
12
+import ui
13
14
from . import interface
15
from .features.diff_sounds import DiffSoundsFeature
@@ -113,3 +114,11 @@ def report_diff_line_status(self):
113
114
if not text or text[0] not in DIFF_SOUNDS:
115
return
116
nvwave.playWaveFile(DIFF_SOUNDS[text[0]])
117
+
118
+ @scriptHandler.script(description=_("Report current line length"))
119
+ def script_report_current_line_length(self, gesture):
120
+ obj = api.getCaretObject()
121
+ text_info = obj.makeTextInfo(textInfos.POSITION_CARET)
122
+ text_info.expand(textInfos.UNIT_LINE)
123
+ line = text_info.text.rstrip("\r\n")
124
+ ui.message(str(len(line)))
0 commit comments