Ticket UUID: | 3307625 | |||
Title: | scroll region of text limited to 32767 pixels | |||
Type: | Bug | Version: | obsolete: 8.5.9 | |
Submitter: | dgp | Created on: | 2011-05-25 16:52:36 | |
Subsystem: | 04. Canvas Basics | Assigned To: | nobody | |
Priority: | 5 Medium | Severity: | Minor | |
Status: | Open | Last Modified: | 2019-12-23 22:06:49 | |
Resolution: | None | Closed By: | nobody | |
Closed on: | ||||
Description: |
Attached script adds a [text] item of 5000 lines to a canvas. Attempts to scroll to the end get stuck as they try to pass 32767 pixels. | |||
User Comments: |
fvogel added on 2019-12-23 22:06:49:
This limit seems to come from the code here, where clipping of values to +/-32767 (min/max of what can be stored in a short int) is done. The source code documents that X is using short ints, which made sense given the number of pixels in our displays at the time the code was written. Changing this is non-trivial. Simply changing the Tk code to use int instead of short quickly leads to changing xlib.h (in the definition of what is an Xpoint), which is not desirable. Perhaps we could fix this by rearranging the Tk code in such a way that Tk_CanvasDrawableCoords() et al. never get passed values exceeding what can be stored in a short. Again, this is far from trivial work. fe.li.ne added on 2011-08-27 09:54:07: #1449858 is about entry widgets. The comments there indicate the same problem in text widgets, but I am not aware that anybody has filed a bug report for text widgets. THIS bug report shows the same problem for text in a canvas - yet a different basic mechanism to put text on a screen that is apparently suffering from the same problem. This means that there is apparently no way to write an application in Tcl that can display a random text file with long lines. That strikes me as severe. fvogelnew1 added on 2011-05-26 00:20:14: Isn't this linked to / same as #1449858? dgp added on 2011-05-25 23:52:42: File Added - 412739: canvasbug.tcl |
Attachments:
- canvasbug.tcl [download] added by dgp on 2011-05-25 23:52:42. [details]