From c379f6d70bc211abd68ba462d9bbbdd725310143 Mon Sep 17 00:00:00 2001 From: svkalinin Date: Thu, 3 Nov 2022 09:57:39 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B5=D0=B1=D0=BE=D0=BB=D1=8C=D1=88?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=20=D0=B2=20?= =?UTF-8?q?=D0=BF=D0=BE=D0=B4=D1=81=D0=BA=D0=B0=D0=B7=D0=BA=D0=B0=D1=85=20?= =?UTF-8?q?=D0=BF=D0=BE=20=D0=BF=D0=B5=D1=80=D0=B5=D0=BC=D0=B5=D0=BD=D0=BD?= =?UTF-8?q?=D1=8B=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/editor.tcl | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/lib/editor.tcl b/lib/editor.tcl index 9a4f841..e48e18a 100644 --- a/lib/editor.tcl +++ b/lib/editor.tcl @@ -508,8 +508,12 @@ namespace eval Editor { set lblText "[::msgcat::mc "Row"]: [lindex $lpos 0], [::msgcat::mc "Column"]: [lindex $lpos 1]" .frmStatus.lblPosition configure -text $lblText unset lpos - $txt tag remove lightSelected 1.0 end - + $txt tag remove lightSelected 1.0 end + + if {$cfgVariables(variableHelper) eq "true"} { + if { [winfo exists .varhelper] } { destroy .varhelper } + } + switch $k { Return { regexp {^(\s*)} [$txt get [expr $lineNum - 1].0 [expr $lineNum - 1].end] -> spaceStart @@ -529,6 +533,15 @@ namespace eval Editor { Right { return } + Shift { + return + } + Controll { + return + } + Meta { + return + } } # set lineStart [$txt index "$pos linestart"] # puts "$pos $lineStart" @@ -546,10 +559,11 @@ namespace eval Editor { set _ [split $ind "."] set ind [lindex $_ 0].[expr [lindex $_ 1] + 1] set word [$txt get $ind $pos] - Editor::VarHelper $box_x $box_y $txt $word - } else { + } else { # set ind [$txt search -backwards -regexp {^} $pos {insert linestart}] set word [$txt get {insert linestart} $pos] + } + if {$word ne ""} { Editor::VarHelper $box_x $box_y $txt $word } }