aboutsummaryrefslogtreecommitdiff
path: root/library/zincText.tcl
diff options
context:
space:
mode:
authorlecoanet2003-03-31 15:56:29 +0000
committerlecoanet2003-03-31 15:56:29 +0000
commit6a7c2c50295530ad62a8aa65c16cd05fc1852536 (patch)
treeb9beb5cf91b652f9946d1f10fb5e8d53c6855ffa /library/zincText.tcl
parent5cc459c9d6af72783f9d9febee9d3a8129bcfd35 (diff)
downloadtkzinc-6a7c2c50295530ad62a8aa65c16cd05fc1852536.zip
tkzinc-6a7c2c50295530ad62a8aa65c16cd05fc1852536.tar.gz
tkzinc-6a7c2c50295530ad62a8aa65c16cd05fc1852536.tar.bz2
tkzinc-6a7c2c50295530ad62a8aa65c16cd05fc1852536.tar.xz
Corrections de bugs
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