{"thread":{"id":"36351","subject":"[PATCH] gitk: switch to patch mode when searching for line origin","startedAt":"2014-04-05T20:38:50Z","lastAt":"2014-06-15T04:56:11Z","messageCount":2,"participants":["Max Kirillov","Paul Mackerras"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"238393","messageId":"20140405203850.GA20967@wheezy.local","threadId":"36351","inReplyTo":null,"subject":"[PATCH] gitk: switch to patch mode when searching for line origin","fromName":"Max Kirillov","fromEmail":"max@max630.net","sentAt":"2014-04-05T20:38:50Z","receivedAt":"2014-04-05T20:38:50Z","isPatch":true,"sender":{"key":"max@max630.net","avatar":"https://avatars.githubusercontent.com/u/381560?v=4"},"body":"If the \"Show origin of this line\" is started from tree mode,\nit still shows the result in tree mode, which I suppose not\nwhat user expects to see.\n---\n gitk | 8 ++++++--\n 1 file changed, 6 insertions(+), 2 deletions(-)\n\ndiff --git a/gitk b/gitk\nindex 90764e8..5a99350 100755\n--- a/gitk\n+++ b/gitk\n@@ -3870,7 +3870,7 @@ proc read_line_source {fd inst} {\n \t    set id $nullid2\n \t}\n \tif {[commitinview $id $curview]} {\n-\t    selectline [rowofcommit $id] 1 [list $fname $lnum]\n+\t    selectline [rowofcommit $id] 1 [list $fname $lnum] 1\n \t} else {\n \t    error_popup [mc \"That line comes from commit %s, \\\n \t\t\t     which is not in this view\" [shortids $id]]\n@@ -7161,7 +7161,7 @@ proc make_idmark {id} {\n     $canv raise $t\n }\n \n-proc selectline {l isnew {desired_loc {}}} {\n+proc selectline {l isnew {desired_loc {}} {switch_to_patch 0}} {\n     global canv ctext commitinfo selectedline\n     global canvy0 linespc parents children curview\n     global currentid sha1entry\n@@ -7187,6 +7187,10 @@ proc selectline {l isnew {desired_loc {}}} {\n \tsetcanvscroll\n     }\n \n+    if {$cmitmode ne \"patch\" && $switch_to_patch} {\n+        set cmitmode \"patch\"\n+    }\n+\n     set y [expr {$canvy0 + $l * $linespc}]\n     set ymax [lindex [$canv cget -scrollregion] 3]\n     set ytop [expr {$y - $linespc - 1}]\n-- \n1.8.5.2.421.g4cdf8d0\n"},{"id":"244203","messageId":"20140615045611.GB21978@iris.ozlabs.ibm.com","threadId":"36351","inReplyTo":"20140405203850.GA20967@wheezy.local","subject":"Re: [PATCH] gitk: switch to patch mode when searching for line origin","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2014-06-15T04:56:11Z","receivedAt":"2014-06-15T04:56:11Z","isPatch":true,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"On Sat, Apr 05, 2014 at 11:38:50PM +0300, Max Kirillov wrote:\n> If the \"Show origin of this line\" is started from tree mode,\n> it still shows the result in tree mode, which I suppose not\n> what user expects to see.\n\nThanks, applied.\n\nPaul.\n"}]}