{"thread":{"id":"48511","subject":"Troubles with picking an editor during Git update","startedAt":"2018-05-17T14:31:44Z","lastAt":"2018-05-18T15:58:37Z","messageCount":4,"participants":["Bartosz Konikiewicz","Philip Oakley, CEng MIET","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"347912","messageId":"CAAdU=LtfkKOKnJJC9yvxG+dZxqUh-Pwa5=ra1DOTfxQSY3e6qg@mail.gmail.com","threadId":"48511","inReplyTo":null,"subject":"Troubles with picking an editor during Git update","fromName":"Bartosz Konikiewicz","fromEmail":"izdwuut@gmail.com","sentAt":"2018-05-17T14:31:38Z","receivedAt":"2018-05-17T14:31:44Z","isPatch":false,"sender":{"key":"izdwuut@gmail.com","avatar":null},"body":"Hi there!\n\nI had an issue with Git installer for Windows while trying to update\nmy instance of the software. My previous version was \"git version\n2.15.1.windows.2\", while my operating system prompted me to upgrade to\n\"2.17.0\". The installer asked me to \"choose the default editor for\nGit\". One of these options was Notepad++ - my editor of choice. Vim\nwas selected by default and I've picked Notepad++ from a drop-down\nlist. As soon as I did it, a \"next\" button greyed out. When I moved\nback to the previous step and then forward to the editor choice, the\n\"Notepad++\" option was still highlighted, and the \"next\" button wasn't\ngreyed out anymore - it was active and I was able to press it and\ncontinue installation.\n\nSteps to reproduce:\n\n1. Have Notepad++ 6.6.9 installed on Windows 10 64-bit 10.0.17134 Build 17134.\n2. Use an installer for version 2.17.0 to upgrade from version 2.15.1.\n3. On an editor selection screen, choose Notepad++ instead of Vim. You\nshould be unable to continue installation because of the \"next\" button\nbeing disabled.\n4. Press \"prev\".\n5. Press \"next\". Notepad++ should be still highlighted, and the \"next\"\nbutton should be active, allowing to continue installation.\n\nI find it to be a crafty trick to make me use Vim. I have considered\nit for a good moment.\n"},{"id":"347931","messageId":"2DABB84AEA714D88B73ECF6FA3170BF5@PhilipOakley","threadId":"48511","inReplyTo":"CAAdU=LtfkKOKnJJC9yvxG+dZxqUh-Pwa5=ra1DOTfxQSY3e6qg@mail.gmail.com","subject":"Re: Troubles with picking an editor during Git update","fromName":"Philip Oakley, CEng MIET","fromEmail":"philipoakley@theiet.org","sentAt":"2018-05-17T19:55:43Z","receivedAt":"2018-05-17T20:04:03Z","isPatch":false,"sender":{"key":"philipoakley@theiet.org","avatar":null},"body":"Hi Bartosz,\n\nFrom: \"Bartosz Konikiewicz\" <izdwuut@gmail.com>\n> Hi there!\n>\n> I had an issue with Git installer for Windows while trying to update\n\nThe Git for Windows package is managed, via https://gitforwindows.org/, as a \nseparate application, based on Git.\n\n> my instance of the software. My previous version was \"git version\n> 2.15.1.windows.2\", while my operating system prompted me to upgrade to\n> \"2.17.0\". The installer asked me to \"choose the default editor for\n> Git\". One of these options was Notepad++ - my editor of choice. Vim\n> was selected by default and I've picked Notepad++ from a drop-down\n> list. As soon as I did it, a \"next\" button greyed out. When I moved\n> back to the previous step and then forward to the editor choice, the\n> \"Notepad++\" option was still highlighted, and the \"next\" button wasn't\n> greyed out anymore - it was active and I was able to press it and\n> continue installation.\n>\n> Steps to reproduce:\n>\n> 1. Have Notepad++ 6.6.9 installed on Windows 10 64-bit 10.0.17134 Build \n> 17134.\n> 2. Use an installer for version 2.17.0 to upgrade from version 2.15.1.\n> 3. On an editor selection screen, choose Notepad++ instead of Vim. You\n> should be unable to continue installation because of the \"next\" button\n> being disabled.\n> 4. Press \"prev\".\n> 5. Press \"next\". Notepad++ should be still highlighted, and the \"next\"\n> button should be active, allowing to continue installation.\n>\n> I find it to be a crafty trick to make me use Vim. I have considered\n> it for a good moment.\n>\nThe best place to report the issue, and perhaps contribure is via the 'GfW' \nIssue tracker https://github.com/git-for-windows/git/issues.\n\nBuilding Git for Windows via the SDK has become even easier with recent \nupdates, so it should be relativley easy to spot the offending line in the \ninstaller and perhaps even propose a PR (Pull Request) to fix the issue.\n\nregards\nPhilip\n\n"},{"id":"347937","messageId":"nycvar.QRO.7.76.6.1805180016210.77@tvgsbejvaqbjf.bet","threadId":"48511","inReplyTo":"CAAdU=LtfkKOKnJJC9yvxG+dZxqUh-Pwa5=ra1DOTfxQSY3e6qg@mail.gmail.com","subject":"Re: Troubles with picking an editor during Git update","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2018-05-17T22:17:03Z","receivedAt":"2018-05-17T22:17:09Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Bartosz,\n\nOn Thu, 17 May 2018, Bartosz Konikiewicz wrote:\n\n> I had an issue with Git installer for Windows while trying to update\n> my instance of the software. My previous version was \"git version\n> 2.15.1.windows.2\", while my operating system prompted me to upgrade to\n> \"2.17.0\". The installer asked me to \"choose the default editor for\n> Git\". One of these options was Notepad++ - my editor of choice. Vim\n> was selected by default and I've picked Notepad++ from a drop-down\n> list. As soon as I did it, a \"next\" button greyed out. When I moved\n> back to the previous step and then forward to the editor choice, the\n> \"Notepad++\" option was still highlighted, and the \"next\" button wasn't\n> greyed out anymore - it was active and I was able to press it and\n> continue installation.\n> \n> Steps to reproduce:\n> \n> 1. Have Notepad++ 6.6.9 installed on Windows 10 64-bit 10.0.17134 Build 17134.\n> 2. Use an installer for version 2.17.0 to upgrade from version 2.15.1.\n> 3. On an editor selection screen, choose Notepad++ instead of Vim. You\n> should be unable to continue installation because of the \"next\" button\n> being disabled.\n> 4. Press \"prev\".\n> 5. Press \"next\". Notepad++ should be still highlighted, and the \"next\"\n> button should be active, allowing to continue installation.\n> \n> I find it to be a crafty trick to make me use Vim. I have considered\n> it for a good moment.\n\nThe code to generate that wizard page is here:\nhttps://github.com/git-for-windows/build-extra/blob/5c6f2997acd694f5375722d8d494fb1337abc1fa/installer/install.iss#L1111-L1196\n\nCan you spot anything obvious that could be responsible for the issue you\nreported? (I can't.)\n\nCiao,\nJohannes\n"},{"id":"347990","messageId":"CAAdU=LuzJmR-zXmDB-HvHCiA-S1_HLEWueVAOOLDOCdqLtZbBg@mail.gmail.com","threadId":"48511","inReplyTo":"nycvar.QRO.7.76.6.1805180016210.77@tvgsbejvaqbjf.bet","subject":"Re: Troubles with picking an editor during Git update","fromName":"Bartosz Konikiewicz","fromEmail":"izdwuut@gmail.com","sentAt":"2018-05-18T15:58:32Z","receivedAt":"2018-05-18T15:58:37Z","isPatch":false,"sender":{"key":"izdwuut@gmail.com","avatar":null},"body":"Git guidelines states that I should leave cc intact. I have altered\nit, as I wanted to reply to both of you. I hope that my approach can\nbe considered acceptable.\n\nJohannes, I see the following line in the piece of code you quoted:\n  EditorAvailable[GE_NotepadPlusPlus]:=RegQueryStringValue(HKEY_LOCAL_MACHINE,'SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App\nPaths\\notepad++.exe','',NotepadPlusPlusPath);\n\nIt mentions the following registry key, which was missing from my registry:\n  HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App\nPaths\\notepad++.exe\n\nI reinstalled Notepad++ 6.6.9, which added the key and made the\ninstaller acknowledge that Notepad++ is installed on my system.\n\nThanks for encouraging me to further investigate the issue. I have dig\ndeeper into the file that you linked for me. As far as my\ncomprehension goes, an EditorSelectionChanged procedure (line 1084) is\nresponsible for toggling the \"next\" button. I noticed that it gets\ninvoked in at least 2 situations:\n  - when an user picks a text editor (an OnChange event, line 1119)\n  - once the custom page for configuring the default Git editor is\ninitialized (the InitializeWizard procedure, line 1199)\n\nMy reasoning tells me that it would be applicable in the\nNextButtonClick procedure as well. I'd add the following piece of code\nto it:\n  if (EditorPage<>NIL) and (CurPageID=EditorPage.ID) then begin\n      EditorSelectionChanged(NIL);\n  end;\n\nI'd also remove the line 1199, as I think the change that I proposed\nwould render it redundant.\n\nPhilip, I feel that composing a pull request is beyond me. I came to a\nconclusion that it would drain me of too much resources. Thanks for\nthe suggestion, as it would be my first pull request ever. I didn't\nmanage to achieve it, although I believe that I would be capable of\ndoing this, which already fills me with utter joy. I am willing to\npost my report to Git for Windows issue tracker. Thanks for the\nsuggestion!\n"}]}