git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Troubles with picking an editor during Git update
@ 2018-05-17 14:31 Bartosz Konikiewicz
  2018-05-17 19:55 ` Philip Oakley, CEng MIET
  2018-05-17 22:17 ` Johannes Schindelin
  0 siblings, 2 replies; 4+ messages in thread
From: Bartosz Konikiewicz @ 2018-05-17 14:31 UTC (permalink / raw)
  To: git

Hi there!

I had an issue with Git installer for Windows while trying to update
my instance of the software. My previous version was "git version
2.15.1.windows.2", while my operating system prompted me to upgrade to
"2.17.0". The installer asked me to "choose the default editor for
Git". One of these options was Notepad++ - my editor of choice. Vim
was selected by default and I've picked Notepad++ from a drop-down
list. As soon as I did it, a "next" button greyed out. When I moved
back to the previous step and then forward to the editor choice, the
"Notepad++" option was still highlighted, and the "next" button wasn't
greyed out anymore - it was active and I was able to press it and
continue installation.

Steps to reproduce:

1. Have Notepad++ 6.6.9 installed on Windows 10 64-bit 10.0.17134 Build 17134.
2. Use an installer for version 2.17.0 to upgrade from version 2.15.1.
3. On an editor selection screen, choose Notepad++ instead of Vim. You
should be unable to continue installation because of the "next" button
being disabled.
4. Press "prev".
5. Press "next". Notepad++ should be still highlighted, and the "next"
button should be active, allowing to continue installation.

I find it to be a crafty trick to make me use Vim. I have considered
it for a good moment.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Troubles with picking an editor during Git update
  2018-05-17 14:31 Troubles with picking an editor during Git update Bartosz Konikiewicz
@ 2018-05-17 19:55 ` Philip Oakley, CEng MIET
  2018-05-17 22:17 ` Johannes Schindelin
  1 sibling, 0 replies; 4+ messages in thread
From: Philip Oakley, CEng MIET @ 2018-05-17 19:55 UTC (permalink / raw)
  To: Bartosz Konikiewicz, git

Hi Bartosz,

From: "Bartosz Konikiewicz" <izdwuut@gmail.com>
> Hi there!
>
> I had an issue with Git installer for Windows while trying to update

The Git for Windows package is managed, via https://gitforwindows.org/, as a 
separate application, based on Git.

> my instance of the software. My previous version was "git version
> 2.15.1.windows.2", while my operating system prompted me to upgrade to
> "2.17.0". The installer asked me to "choose the default editor for
> Git". One of these options was Notepad++ - my editor of choice. Vim
> was selected by default and I've picked Notepad++ from a drop-down
> list. As soon as I did it, a "next" button greyed out. When I moved
> back to the previous step and then forward to the editor choice, the
> "Notepad++" option was still highlighted, and the "next" button wasn't
> greyed out anymore - it was active and I was able to press it and
> continue installation.
>
> Steps to reproduce:
>
> 1. Have Notepad++ 6.6.9 installed on Windows 10 64-bit 10.0.17134 Build 
> 17134.
> 2. Use an installer for version 2.17.0 to upgrade from version 2.15.1.
> 3. On an editor selection screen, choose Notepad++ instead of Vim. You
> should be unable to continue installation because of the "next" button
> being disabled.
> 4. Press "prev".
> 5. Press "next". Notepad++ should be still highlighted, and the "next"
> button should be active, allowing to continue installation.
>
> I find it to be a crafty trick to make me use Vim. I have considered
> it for a good moment.
>
The best place to report the issue, and perhaps contribure is via the 'GfW' 
Issue tracker https://github.com/git-for-windows/git/issues.

Building Git for Windows via the SDK has become even easier with recent 
updates, so it should be relativley easy to spot the offending line in the 
installer and perhaps even propose a PR (Pull Request) to fix the issue.

regards
Philip


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Troubles with picking an editor during Git update
  2018-05-17 14:31 Troubles with picking an editor during Git update Bartosz Konikiewicz
  2018-05-17 19:55 ` Philip Oakley, CEng MIET
@ 2018-05-17 22:17 ` Johannes Schindelin
  2018-05-18 15:58   ` Bartosz Konikiewicz
  1 sibling, 1 reply; 4+ messages in thread
From: Johannes Schindelin @ 2018-05-17 22:17 UTC (permalink / raw)
  To: Bartosz Konikiewicz; +Cc: git

Hi Bartosz,

On Thu, 17 May 2018, Bartosz Konikiewicz wrote:

> I had an issue with Git installer for Windows while trying to update
> my instance of the software. My previous version was "git version
> 2.15.1.windows.2", while my operating system prompted me to upgrade to
> "2.17.0". The installer asked me to "choose the default editor for
> Git". One of these options was Notepad++ - my editor of choice. Vim
> was selected by default and I've picked Notepad++ from a drop-down
> list. As soon as I did it, a "next" button greyed out. When I moved
> back to the previous step and then forward to the editor choice, the
> "Notepad++" option was still highlighted, and the "next" button wasn't
> greyed out anymore - it was active and I was able to press it and
> continue installation.
> 
> Steps to reproduce:
> 
> 1. Have Notepad++ 6.6.9 installed on Windows 10 64-bit 10.0.17134 Build 17134.
> 2. Use an installer for version 2.17.0 to upgrade from version 2.15.1.
> 3. On an editor selection screen, choose Notepad++ instead of Vim. You
> should be unable to continue installation because of the "next" button
> being disabled.
> 4. Press "prev".
> 5. Press "next". Notepad++ should be still highlighted, and the "next"
> button should be active, allowing to continue installation.
> 
> I find it to be a crafty trick to make me use Vim. I have considered
> it for a good moment.

The code to generate that wizard page is here:
https://github.com/git-for-windows/build-extra/blob/5c6f2997acd694f5375722d8d494fb1337abc1fa/installer/install.iss#L1111-L1196

Can you spot anything obvious that could be responsible for the issue you
reported? (I can't.)

Ciao,
Johannes

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Troubles with picking an editor during Git update
  2018-05-17 22:17 ` Johannes Schindelin
@ 2018-05-18 15:58   ` Bartosz Konikiewicz
  0 siblings, 0 replies; 4+ messages in thread
From: Bartosz Konikiewicz @ 2018-05-18 15:58 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: git, philipoakley

Git guidelines states that I should leave cc intact. I have altered
it, as I wanted to reply to both of you. I hope that my approach can
be considered acceptable.

Johannes, I see the following line in the piece of code you quoted:
  EditorAvailable[GE_NotepadPlusPlus]:=RegQueryStringValue(HKEY_LOCAL_MACHINE,'SOFTWARE\Microsoft\Windows\CurrentVersion\App
Paths\notepad++.exe','',NotepadPlusPlusPath);

It mentions the following registry key, which was missing from my registry:
  HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App
Paths\notepad++.exe

I reinstalled Notepad++ 6.6.9, which added the key and made the
installer acknowledge that Notepad++ is installed on my system.

Thanks for encouraging me to further investigate the issue. I have dig
deeper into the file that you linked for me. As far as my
comprehension goes, an EditorSelectionChanged procedure (line 1084) is
responsible for toggling the "next" button. I noticed that it gets
invoked in at least 2 situations:
  - when an user picks a text editor (an OnChange event, line 1119)
  - once the custom page for configuring the default Git editor is
initialized (the InitializeWizard procedure, line 1199)

My reasoning tells me that it would be applicable in the
NextButtonClick procedure as well. I'd add the following piece of code
to it:
  if (EditorPage<>NIL) and (CurPageID=EditorPage.ID) then begin
      EditorSelectionChanged(NIL);
  end;

I'd also remove the line 1199, as I think the change that I proposed
would render it redundant.

Philip, I feel that composing a pull request is beyond me. I came to a
conclusion that it would drain me of too much resources. Thanks for
the suggestion, as it would be my first pull request ever. I didn't
manage to achieve it, although I believe that I would be capable of
doing this, which already fills me with utter joy. I am willing to
post my report to Git for Windows issue tracker. Thanks for the
suggestion!

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-05-18 15:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-17 14:31 Troubles with picking an editor during Git update Bartosz Konikiewicz
2018-05-17 19:55 ` Philip Oakley, CEng MIET
2018-05-17 22:17 ` Johannes Schindelin
2018-05-18 15:58   ` Bartosz Konikiewicz

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).