{"thread":{"id":"35533","subject":"gitk's back button broken (Refactor per-line part of getblobdiffline and its support)","startedAt":"2013-12-16T13:56:24Z","lastAt":"2013-12-19T23:16:58Z","messageCount":3,"participants":["Johannes Sixt","Thomas Rast"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"232052","messageId":"52AF0688.3070104@viscovery.net","threadId":"35533","inReplyTo":null,"subject":"gitk's back button broken (Refactor per-line part of getblobdiffline and its support)","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2013-12-16T13:56:24Z","receivedAt":"2013-12-16T13:56:24Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"To reproduce, start gitk in any repository, click a commit, then the\n\"back\" button (left-pointing arrow button) or type Alt+Cursor-Left. The\nerror I get is this:\n\ncan't use non-numeric string as operand of \"!\"\ncan't use non-numeric string as operand of \"!\"\n    while executing\n\"if {!$ateof} {\n\tset nlines [expr {[winfo height $ctext]\n\t\t\t  / [font metrics textfont -linespace]}]\n\tif {[$ctext compare \"$target_scrollpos + $nlines ...\"\n    (procedure \"maybe_scroll_ctext\" line 5)\n    invoked from within\n\"maybe_scroll_ctext ateof\"\n    (procedure \"blobdiffmaybeseehere\" line 6)\n    invoked from within\n\"blobdiffmaybeseehere [eof $bdf]\"\n    (procedure \"getblobdiffline\" line 15)\n    invoked from within\n\"getblobdiffline filef5ec60 5de460a2cfdd4acbadd41355a5b34dc69e93b89e\"\n    (\"eval\" body line 1)\n    invoked from within\n\"eval $script\"\n    (procedure \"dorunq\" line 11)\n    invoked from within\n\"dorunq\"\n    (\"after\" script)\n\nAfter dismissing the error, gitk is still responsive, but does not show\ndiffs anymore.\n\nThe error bisects to 5de460a2c (gitk: Refactor per-line part of\ngetblobdiffline and its support) which is already merged downstream into git.\n\nCould you please have a look?\n\n-- Hannes\n"},{"id":"232230","messageId":"52B29CB8.8090304@viscovery.net","threadId":"35533","inReplyTo":"52AF0688.3070104@viscovery.net","subject":"[PATCH] gitk: Fix typo in proc blobdiffmaybeseehere","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2013-12-19T07:14:00Z","receivedAt":"2013-12-19T07:14:00Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"From: Johannes Sixt <j6t@kdbg.org>\n\nThe recent 5de460a2 (Refactor per-line part of getblobdiffline and its\nsupport) introduced blobdiffmaybeseehere, and accidentally forgot the '$'\nto access the parameter as a TCL variable. This resulted in a failing\n\"Back\" button with the error\n\ncan't use non-numeric string as operand of \"!\"\n    while executing\n\"if {!$ateof} {\n\tset nlines [expr {[winfo height $ctext]\n\t\t\t  / [font metrics textfont -linespace]}]\n\tif {[$ctext compare \"$target_scrollpos + $nlines ...\"\n    (procedure \"maybe_scroll_ctext\" line 5)\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\nAm 12/16/2013 14:56, schrieb Johannes Sixt:\n> To reproduce, start gitk in any repository, click a commit, then the\n> \"back\" button (left-pointing arrow button) or type Alt+Cursor-Left. The\n> error I get is this:\n> \n> can't use non-numeric string as operand of \"!\"\n\nIt turns out to be just a simple typo.\n\n-- Hannes\n\n gitk | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/gitk b/gitk\nindex 33c3a6c..1f14796 100755\n--- a/gitk\n+++ b/gitk\n@@ -7922,7 +7922,7 @@ proc blobdiffmaybeseehere {ateof} {\n     if {$diffseehere >= 0} {\n \tmark_ctext_line [lindex [split $diffseehere .] 0]\n     }\n-    maybe_scroll_ctext ateof\n+    maybe_scroll_ctext $ateof\n }\n \n proc getblobdiffline {bdf ids} {\n-- \n1.8.5.1.1587.g3845a3d\n"},{"id":"232267","messageId":"87ob4cctxx.fsf@linux-1gf2.Speedport_W723_V_Typ_A_1_00_098","threadId":"35533","inReplyTo":"52B29CB8.8090304@viscovery.net","subject":"Re: [PATCH] gitk: Fix typo in proc blobdiffmaybeseehere","fromName":"Thomas Rast","fromEmail":"tr@thomasrast.ch","sentAt":"2013-12-19T23:16:58Z","receivedAt":"2013-12-19T23:16:58Z","isPatch":true,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Johannes Sixt <j.sixt@viscovery.net> writes:\n\n> can't use non-numeric string as operand of \"!\"\n>     while executing\n> \"if {!$ateof} {\n> \tset nlines [expr {[winfo height $ctext]\n> \t\t\t  / [font metrics textfont -linespace]}]\n> \tif {[$ctext compare \"$target_scrollpos + $nlines ...\"\n>     (procedure \"maybe_scroll_ctext\" line 5)\n>\n> Signed-off-by: Johannes Sixt <j6t@kdbg.org>\n> ---\n> Am 12/16/2013 14:56, schrieb Johannes Sixt:\n>> To reproduce, start gitk in any repository, click a commit, then the\n>> \"back\" button (left-pointing arrow button) or type Alt+Cursor-Left. The\n>> error I get is this:\n>> \n>> can't use non-numeric string as operand of \"!\"\n>\n> It turns out to be just a simple typo.\n[...]\n> -    maybe_scroll_ctext ateof\n> +    maybe_scroll_ctext $ateof\n>  }\n\nEw.  Sorry about that!\n\nIt's very polite of you to call it a typo, but I think it's safe to\nblame it on my lack of practice in Tcl :-)\n\n-- \nThomas Rast\ntr@thomasrast.ch\n"}]}