aboutsummaryrefslogtreecommitdiff
path: root/library/zincText.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'library/zincText.tcl')
-rw-r--r--library/zincText.tcl12
1 files changed, 6 insertions, 6 deletions
diff --git a/library/zincText.tcl b/library/zincText.tcl
index a3a9a69..6372c1f 100644
--- a/library/zincText.tcl
+++ b/library/zincText.tcl
@@ -105,16 +105,17 @@ proc insertChar {w c} {
set item [$w focus]
set selItem [$w select item]
+ puts "item: $item, selItem: $selItem"
if {[llength $item] == 0} {
return;
}
- if {([llength $selItem] == [llength $item]) &&
+ if {([llength $selItem]!= 0) &&
([lindex $selItem 0] == [lindex $item 0]) &&
([lindex $selItem 1] == [lindex $item 1])} {
$w dchars $item sel.first sel.last
}
- $w insert $item insert $c
+ $w insert [lindex $item 0] insert $c
}
@@ -123,7 +124,7 @@ proc insertKey {w c} {
return;
}
- insertChar($w, $c);
+ insertChar $w $c
}
@@ -164,15 +165,14 @@ proc extendSel {w x y} {
proc textDel {w dir} {
- set item [$w focus]
+ set item [lindex [$w focus] 0]
set selItem [$w select item]
- my $ind;
if {[llength $item] == 0} {
return;
}
- if {([llength $selItem] == [llength $item]) &&
+ if {([llength $selItem] != 0) &&
([lindex $selItem 0] == [lindex $item 0]) &&
([lindex $selItem 1] == [lindex $item 1])} {
$w dchars $item sel.first sel.last