Tk Source Code

Check-in [e7376829]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Bugfix [6f99ae03c4]: In rare cases LayoutLogicalLine() may be called when display line is already out of date, for example when TextBlinkProc() is invoked.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | revised_text | tip-466
Files: files | file ages | folders
SHA3-256: e73768290397f79dd193689d6f5ba67b777e2f1d8b0c81fc0c78d721228d1597
User & Date: gcramer 2018-10-26 12:16:42
Context
2018-10-30
12:45
Bugfix [6e16952a49]: Issue (2) fixed, cursor will be visible even if -padx is zero. check-in: 08ec7aed user: gcramer tags: revised_text, tip-466
2018-10-26
12:16
Bugfix [6f99ae03c4]: In rare cases LayoutLogicalLine() may be called when display line is already out of date, for example when TextBlinkProc() is invoked. check-in: e7376829 user: gcramer tags: revised_text, tip-466
2018-10-22
20:53
merge trunk check-in: 58aefded user: jan.nijtmans tags: revised_text, tip-466
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/tkTextDisp.c.

3836
3837
3838
3839
3840
3841
3842

3843
3844
3845
3846
3847
3848
3849
3850
3851
3852









3853
3854
3855
3856
3857
3858
3859
}

static bool
LayoutLogicalLine(
    LayoutData *data,
    DLine *dlPtr)
{

    TkTextSegment *segPtr, *endPtr;
    int byteIndex, byteOffset;

    assert(!TkTextIsElided(&data->index));

    byteIndex = TkTextIndexGetByteIndex(&data->index);

    if (data->displayLineNo > 0) {
	const TkTextDispLineInfo *dispLineInfo =
		TkBTreeLinePixelInfo(data->textPtr, data->logicalLinePtr)->dispLineInfo;









	const TkTextDispLineEntry *dispLineEntry = dispLineInfo->entry + (data->displayLineNo - 1);

	if (dispLineEntry->tabIndex) {
	    const TextDInfo *dInfoPtr = data->textPtr->dInfoPtr;
	    const StyleValues *sValuePtr;
	    TextStyle *stylePtr;
	    int byteOffset;






>








<
|
>
>
>
>
>
>
>
>
>







3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851

3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
}

static bool
LayoutLogicalLine(
    LayoutData *data,
    DLine *dlPtr)
{
    const TkTextDispLineInfo *dispLineInfo = NULL;
    TkTextSegment *segPtr, *endPtr;
    int byteIndex, byteOffset;

    assert(!TkTextIsElided(&data->index));

    byteIndex = TkTextIndexGetByteIndex(&data->index);

    if (data->displayLineNo > 0) {

	dispLineInfo = TkBTreeLinePixelInfo(data->textPtr, data->logicalLinePtr)->dispLineInfo;
	/*
	 * It's possible that display line info not exists. But this can only happen if the
	 * content is out of date and will be re-computed later. In such a case the next block
	 * of code can be skipped. This happens only in rare cases, for example when
	 * TextBlinkProc() has been invoked.
	 */
    }

    if (dispLineInfo) {
	const TkTextDispLineEntry *dispLineEntry = dispLineInfo->entry + (data->displayLineNo - 1);

	if (dispLineEntry->tabIndex) {
	    const TextDInfo *dInfoPtr = data->textPtr->dInfoPtr;
	    const StyleValues *sValuePtr;
	    TextStyle *stylePtr;
	    int byteOffset;