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: [email protected]    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.
1
  • For the record, I have tried downgrading to nano version 2.0.9 via the Cygwin installer, but that didn't fix the problem. Feb 24, 2012 at 10:05

2 Answers 2

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.

-1

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

10
  • 1
    what telnet ?! .
    – Sirex
    Feb 23, 2012 at 11:24
  • There is no telnet involved, and when I use vi the cursor works exactly as expected. Feb 23, 2012 at 19:13
  • 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
    Feb 24, 2012 at 8:32
  • There are different ways to read keyboard input. could be nano is reading blocks when vi characters...
    – ZaB
    Feb 24, 2012 at 9:30
  • It also works in emacs. But regarding your point, is there any way I can check this block/character thing? Feb 24, 2012 at 9:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .