Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hitting enter key once does not take me to next line! #4631

Closed
sevakmaheshr opened this issue Jul 4, 2018 · 12 comments
Closed

Hitting enter key once does not take me to next line! #4631

sevakmaheshr opened this issue Jul 4, 2018 · 12 comments
Assignees

Comments

@sevakmaheshr
Copy link

Description of the Issue

In most text/code editors we expect that hitting the "enter" key will take us to the beginning of the next line. But, that doesn't happen on my Notepad++.

HAVING TO HIT THE ENTER KEY TWICE AT THE END OF EVERY LINE, TO GET TO THE NEXT LINE, IS VERY ANNOYING.

Details:

  • Notepad++ version: 7.5.6 (32-bit)
  • System: Windows 10 (32-bit)

Steps to Reproduce the Issue

  1. Start notepad++
  2. Type some text "this is a line" and then hit the enter key
  3. At the end of step 2 I (and possibly even you will) find that the cursor stays at the end of the line where I hit the enter key
  4. Hit the enter key again and then the cursor moves to the next line

Expected Behavior

I expect that hitting the "enter" key once will take me to the beginning of the next line, as is the case in most (almost all other) text/code editors.

Actual Behavior

When I hit the Enter key once, the cursor stay on the same line, at the same position.
Hitting the Enter key again takes me to the next line!
** I have to hit the ENTER key twice. **

Debug Information

NONE

@CookiePLMonster
Copy link
Contributor

Are you sure this is not some plugin or third party program stealing your key press? Maybe Sticky Keys?

@warg0x4e
Copy link

warg0x4e commented Jul 8, 2018

I can't reproduce the behavior sevakmaheshr is experiencing.

@DrPlantabyte
Copy link

DrPlantabyte commented Dec 27, 2019

I'm having the same problem on Notepad++ version v7.8.2.

Turning on Show All Characters (the paragraph P symbol on the toolbar), I discovered that Notepad++ is inserting a CR when I hit enter, no matter what the line-ending setting is. A new line is only rendered after the second CR is entered if line-endings are set to CR LF (windows)

Expected behavior:

  • if line-endings set to LF, then hitting enter inserts LF
  • if line-endings set to CR LF, then hitting enter inserts CR LF
  • if line-endings set to CR, then hitting enter inserts CR

Observed behavior:

  • if line-endings set to LF, then hitting enter inserts CR
  • if line-endings set to CR LF, then hitting enter inserts CR
  • if line-endings set to CR, then hitting enter inserts CR

This is a relatively new bug. I did not have this problem before updating, though I don't remember what version I updated from (I update only a couple times per year)

@sasumner
Copy link
Contributor

@Cyanobacterium It doesn't reproduce for me under 7.8.2. Can you try a portable "install" (if that is not already what you are running)?

Also, what plugins do you have? Paste your ? menu -> Debug Info... output here.

@DrPlantabyte
Copy link

I installed via chocolatey (ie choco install notepadplusplus and choco upgrade notepadplusplus in the PowerShell). I don't think I've installed any plugins.

Here's my debug info:

Notepad++ v7.8.2   (64-bit)
Build time : Dec  4 2019 - 01:39:49
Path : C:\Program Files\Notepad++\notepad++.exe
Admin mode : OFF
Local Conf mode : OFF
OS Name : Windows 10 Home (64-bit) 
OS Version : 1903
OS Build : 18362.535
Plugins : DSpellCheck.dll mimeTools.dll NppConverter.dll NppExport.dll 

The portable version works as expected (no bug). Portable version debug info:

Notepad++ v7.8.2   (64-bit)
Build time : Dec  4 2019 - 01:39:49
Path : D:\CCHall\Downloads\npp.7.8.2.bin.x64\notepad++.exe
Admin mode : OFF
Local Conf mode : ON
OS Name : Windows 10 Home (64-bit) 
OS Version : 1903
OS Build : 18362.535
Plugins : mimeTools.dll NppConverter.dll NppExport.dll 

I'll try uninstalling and reinstalling via chocolatey and get back to you.

@DrPlantabyte
Copy link

DrPlantabyte commented Dec 27, 2019

How strange!

I uninstalled ( choco uninstall notepadplusplus ), confirmed uninstallation by trying (and failing) to run Notepad++, then reinstalled ( choco install notepadplusplus ).

Then first time I opened Notepad++ after reinstalling, it worked correctly but did not remember my previously opened files. Then I closed and re-opened Notepad++ and it re-opened my old files again, but also had the same bug again! (edit: I tested multiple file types in case it was a language setting but the bug persists in all files and in new files)

Is this a configuration problem? How can I reset all the options back to default?

@DrPlantabyte
Copy link

@sasumner, @sevakmaheshr, I was able to fix the problem by deleting the directory C:\Users\%USERNAME%\AppData\Roaming\Notepad++

Any ideas how a bad config file could cause this problem?

Debug info after deleting the directory:

Notepad++ v7.8.2   (64-bit)
Build time : Dec  4 2019 - 01:39:49
Path : C:\Program Files\Notepad++\notepad++.exe
Admin mode : OFF
Local Conf mode : OFF
OS Name : Windows 10 Home (64-bit) 
OS Version : 1903
OS Build : 18362.535
Plugins : DSpellCheck.dll mimeTools.dll NppConverter.dll NppExport.dll 

@jedio60
Copy link

jedio60 commented Jun 8, 2020

One potential cause for losing 'Enter' key presses seems to be Auto-Completion. See my just-made issue report #8389 (title: Enter key is consumed by the Auto-Completion function).

But that should not be the cause in this issue report, because the last word ('line') is not yet anywhere else in the document, so Auto-Completion won't pop up (I suppose).

@ShashiKumar-SignalWire
Copy link

I have the same issue, enter key not take me to the next line for first hit

@DrPlantabyte
Copy link

I have the same issue, enter key not take me to the next line for first hit

Have you tried deleting the config directory? (typically C:\Users\%USERNAME%\AppData\Roaming\Notepad++ on windows)

@toddarnold
Copy link

I have had this same problem for a long time, on multiple PCs and multiple versions of Notepad++. However, for me it is intermittent - it happens on some lines and not on others. Very annoying. I don't have any plugins other than the standard ones that come pre-installed.

@donho donho self-assigned this Jan 8, 2022
@donho
Copy link
Member

donho commented Jan 8, 2022

To people who have got this issue, could you confirm me that just before hitting the 1st ENTER, the auto-completion box appears?

donho added a commit to donho/notepad-plus-plus that referenced this issue Jan 10, 2022
Auto-completion currently use both ENTER and TAB to insert the selected item,
in some circumstance people have to ENTER twice to have 1 newline feed.

in this commit, 2 options (ENTER & TAB) are given in Auto-completion settings,
so users can choose one of these 2 keystrokes (or both, or none).
By default ENTER is disabled and TAB is enabled.

Fix notepad-plus-plus#4799, fix notepad-plus-plus#4631, fix 8389, fix notepad-plus-plus#10915
@donho donho closed this as completed in 68d339d Jan 10, 2022
chcg pushed a commit to chcg/notepad-plus-plus that referenced this issue Jan 15, 2022
…ed item,

in some circumstance people have to ENTER twice to have 1 newline feed.

In this commit, 2 options (ENTER & TAB) are given in Auto-completion settings, so users can choose one of these 2 keystrokes (or both, or none). By default ENTER is disabled and TAB is enabled.
If auto-completion is disabled and completion is triggered manually, then the settings of ENTER & TAB won't be considered, both ENTER & TAB will be able to insert the selection.

Fix notepad-plus-plus#4799, fix notepad-plus-plus#4631, fix notepad-plus-plus#8389, fix notepad-plus-plus#10915, close notepad-plus-plus#11016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants