Cursor in nano jumps instead of scrolling

1

When scrolling (by holding down the down key) in nano, the cursor does not move while the key is pressed, but once I let go of the key it jumps to where it should be.

How can I get it to move as I hold down the key?

The output of nano -V is:

GNU nano version 2.2.5 (compiled 21:04:20, Nov  3 2010)
(C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
2008, 2009 Free Software Foundation, Inc.
Email: nano@nano-editor.org    Web: http://www.nano-editor.org/
Compiled options: --enable-color --enable-extra --enable-multibuffer --enable-nanorc --enable-utf8

I am using the nano binary that came with Cygwin and I am running bash as my shell in Console on Windows 7 Professional 64bit.

Extra information:

  • I have tried using emacs and vi in the same shell and they both work fine.
  • This happens when I use the arrow keys or the delete key. The backspace key works properly.
  • I have tried downgrading to nano version 2.0.9 with the Cygwin installer, but the issue kept occurring.

DanielGibbs

Posted 2012-02-23T10:34:04.807

Reputation: 447

For the record, I have tried downgrading to nano version 2.0.9 via the Cygwin installer, but that didn't fix the problem. – DanielGibbs – 2012-02-24T10:05:35.103

Answers

1

I was having the same problem after I had first installed Cygwin. The issues persisted in multiple terminal emulators. I have no idea why it happens when compiling nano from source or using Cygwin's package manager - however the WinNT binary at get-nano.org seemed to be (almost) problem-free.

I downloaded it and placed it in Cygwin's bin folder. The scrolling issue was fixed, however I was then met with another problem. Whenever I tried to edit a file that wasn't relative to my current working directory (ex ./folder/asdf vs ~/.bashrc, /home/username/.bashrc etc), I'd get an error saying that the file could not be found.

I added this alias to my ~/.bashrc file: alias nano="~/bin/nano"

with the contents of: /usr/bin/nano $(~/bin/getpath $1)

getpath is a python script that I had written previously to fix a similar issue in another program, it contains the following -

#!/usr/bin/env python

import sys, getpass

try:
    arg = sys.argv[1]
except:
    exit()

if arg[:1] != '/':
    print arg

if arg[:1] == '/' or arg[:1] == '~':
    print '/cygdrive/c/cygwin64' + arg.replace('~', '/home/' + getpass.getuser())

It's a very sloppy solution, but it works.

Aidraj

Posted 2012-02-23T10:34:04.807

Reputation: 11

-1

It is not related to nano. Most likely your telnet or terminal program or keyboard driver or network socket buffers data

ZaB

Posted 2012-02-23T10:34:04.807

Reputation: 2 365

in my case, using nano via telnet with windows client, fails, but with putty's telnet client, works. Thanks – Luis Siquot – 2015-03-15T13:00:09.713

1what telnet ?! . – Sirex – 2012-02-23T11:24:16.353

There is no telnet involved, and when I use vi the cursor works exactly as expected. – DanielGibbs – 2012-02-23T19:13:29.563

regarding your edit: if there's no telnet, there's no network socket either. If it works ok in vi it cant be the keyboard buffer or terminal program either. Did you even read the OP's question ? – Sirex – 2012-02-24T08:32:33.327

There are different ways to read keyboard input. could be nano is reading blocks when vi characters... – ZaB – 2012-02-24T09:30:34.360

It also works in emacs. But regarding your point, is there any way I can check this block/character thing? – DanielGibbs – 2012-02-24T09:54:56.677

Most likely you need to find the source. (or upgrade nano hoping problem goes away) – ZaB – 2012-02-24T11:01:26.180

I don't think that is the reason. I can hold down the backspace key and the cursor moves as I do it, but if I hold down an arrow key or the delete key it doesn't. – DanielGibbs – 2012-02-24T11:41:39.913

Might be your antivirus or other nagware too, but since you have source for both products why don't you find the cause yourself in C code? – ZaB – 2012-02-24T13:44:01.860

I don't have the source, and I really don't know C that well to be able to find the source of the problem even if I did have it. – DanielGibbs – 2012-02-24T19:46:13.253