Opened 2 months ago

Last modified 3 days ago

#28334 reopened defect

Text fields wider than the screeen cropped

Reported by: wagon Owned by: atagar
Priority: Medium Milestone:
Component: Core Tor/Nyx Version: Tor: 0.3.4.9
Severity: Normal Keywords: curses
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Nyx 2.0.4 at Linux.

The first problem exist with all options: if I select some option, then press Enter (so, start editing it), and then press ESC, all old values for the option are erased (value becomes none). This behavior confuses users, because normally ESC should keep old version of values. To my opinion, if I really need to make it none I should manually remove old values (or press ctrl+u) and then press Enter.

The second problem exist with options which have very long list of values. For example, you can consider torrc with a long list of SocksPort options or a long list of values for ExcludeNodes option. If you select such option in configuration editor (press Enter), only the first part of values' list will be shown. Other lengthy part of values list will not be printed and will not be accessible for editing (it is considered as non-existing). I guess it is related to the problem of line splitting (#28297). Since the first part of accessible values may end at any character (when end of line is reached), if I don't do anything, but just print Enter, I may get an error

Unacceptable option value: Invalid SocksPort configuration (press any key)

As nyx gives to Tor wrong option values, there are many warnings in a log file of tor itself, e.g.:

Controller gave us config lines that didn't validate: Invalid SocksPort configuration

Thus, if you accidentally press Enter on any option with too long list of values, you get trapped in inescapable situation: ESC will erase all old values, Enter will change them too (possibly with some errors). It is impossible to preserve status quo.

Child Tickets

Change History (7)

comment:1 Changed 2 months ago by wagon

I confirm this problem also for current Nyx version from git.

comment:2 Changed 8 days ago by atagar

Resolution: fixed
Status: assignedclosed

comment:3 Changed 6 days ago by wagon

Thanks! From patch it looks like you have ignored problems with long list of option values. Will it be resolved?

comment:4 Changed 6 days ago by atagar

Resolution: fixed
Status: closedreopened
Summary: Nyx configurashion editor does not work with options' values properlyText fields wider than the screeen cropped

Oops, sorry about that. Reopening the ticket to specifically be about editing text fields whos content is wider than the screen. That's will be tricky to address and not addressed in Nyx 2.1.0.

comment:5 Changed 6 days ago by atagar

Keywords: curses added

comment:6 in reply to:  4 Changed 3 days ago by wagon

Replying to atagar:

That's will be tricky to address

In such cases you could call some external editor or add readline to Nyx. If you do the latter, you could implement autocompletition too.

comment:7 Changed 3 days ago by atagar

Sorry wagon, I'm unsure what you mean by 'external editor' and, unless I'm missing something, readline is mutually exclusive with curses.

Note: See TracTickets for help on using tickets.