[Tcl-bugs] [Tk] (bll) tkt (New): text: Linux : spacemode trim reports wrong character as hidden (24.11.1)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Tcl-bugs] [Tk] (bll) tkt (New): text: Linux : spacemode trim reports wrong character as hidden (24.11.1)

akupries
Automated mail by fx, on behalf of [hidden email]

Ticket Change [3a6b421cf9cd7491957779335aca8df20550210e]
  [text: Linux : spacemode trim reports wrong character as hidden (24.11.1)]
  By      bll
  For     Tk
  On      2017-07-04T21:28:37.695
  Details https://core.tcl.tk/tk/tinfo?name=3a6b421cf9cd7491957779335aca8df20550210e
  Ticket  https://core.tcl.tk/tk/tktview/c6978a9ec7c033113330478fa136413b57a0c371

Changed Fields
  assignee:   nobody
  closer:     nobody
  comment:    New test 24.11.1 (was 24.11, has -spacemode trim turned on)

              Works on Mac OS X.

              On Linux the space should have a width of 5 and the newline should
              always be hidden (0). The newline offset should be 148.

              '8' '9' space newline 'a'  a:129 3 7 14/136 3 7 14/143 3 0 14/148 3 0
              14/3 17 7 14/  b:129 3 7 14/136 3 7 14/143 3 0 14/143 3 5 14/3 17 7
              14/

              (Mac OS X: [correct]  ---- textDisp-24.11.1 start  '8' '9' space
              newline 'a'  a:129 3 7 14/136 3 7 14/143 3 5 14/148 3 0 14/3 17 7 14/
              b:129 3 7 14/136 3 7 14/143 3 5 14/148 3 0 14/3 17 7 14/  ++++
              textDisp-24.11.1 PASSED  )

              package require Tk

              set twbw 2  set twht 2  option add *Text.borderWidth $twbw  option add
              *Text.highlightThickness $twht

              set fixedFont {"Courier New" -12}  set fixedHeight [font metrics
              $fixedFont -linespace]  set fixedWidth [font measure $fixedFont m]
              set fixedAscent [font metrics $fixedFont -ascent]  set fixedDiff [expr
              {$fixedHeight - 14}]

              frame .f -width 100 -height 20  pack .f -side left  text .t -font
              $fixedFont -width 20 -height 10  pack .t -expand 1 -fill both  update
              wm geometry . {}  update

              wm withdraw .  wm minsize . 1 1  wm positionfrom . user  wm deiconify
              .  update

              .t configure -spacing1 0 -spacing2 0 -spacing3 0  .t configure -wrap
              word

              .t configure -bd 0  .t configure -highlightthickness 2  .t configure
              -relief raised  update

              set bw [.t cget -borderwidth]  set px [.t cget -padx]  set py [.t cget
              -pady]  set hlth [.t cget -highlightthickness]  set padx [expr
              {$bw+$px+$hlth}]  set pady [expr {$bw+$py+$hlth}]

              update  scan [wm geom .] %dx%d width height

              .t configure -spacemode trim  .t configure -wrap char  .t delete 1.0
              end  .t insert 1.0 "01234567890123456789 \ abcdefg"  set w [expr
              {(21*$fixedWidth)-2}]  wm geom . [expr {2*$padx+100+$w}]x$height
              update  set result {}  # space, newline, 'a'  lappend result [.t bbox
              1.20] [.t bbox 1.21] [.t bbox 2.0]  puts "a:[.t bbox 1.18]/[.t bbox
              1.19]/[.t bbox 1.20]/[.t bbox 1.21]/[.t bbox 2.0]/"  .t mark set
              insert 1.21  puts "b:[.t bbox 1.18]/[.t bbox 1.19]/[.t bbox 1.20]/
              ...((truncated))
  foundin:    revised_text
  is_private: 0
  login:      bll
  priority:   5 Medium
  resolution: None
  severity:   Minor
  status:     Open
  submitter:  bll
  subsystem:  18. [text]
  title:      text: Linux : spacemode trim reports wrong character as hidden
              (24.11.1)
  type:       Bug

------------------------------------------------------------
See Tcl/Tk development @ http://core.tcl.tk/
------------------------------------------------------------

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Tcl-Bugs mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tcl-bugs