[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] [bug] segfault when pasting then cutting, when mark is
From: |
Benno Schulenberg |
Subject: |
Re: [Nano-devel] [bug] segfault when pasting then cutting, when mark is on |
Date: |
Wed, 11 Sep 2013 22:12:16 +0200 |
On Tue, Sep 10, 2013, at 17:49, Benno Schulenberg wrote:
> Open a new file, type two <Enter>s, then:
>
> first<Enter>
> second<Cursor-up>
> ^K<Cursor-right><Cursor-right>
> Alt+A<Cursor-right><Cursor-right>
> ^U^K
Segfault. After enabling debug, adding some print statements,
and filtering out lines with () from the dump file:
[...]
matched seq "^P" and btw meta was 0 (menus 1 = 1281)
matched seq "^K" and btw meta was 0 (menus 1 = 1)
Before: topdata is ''first'', x=0; bottomdata is ''second'', x=0.
After: topdata is ''first'', x=0; bottomdata is '''', x=0.
Dumping cutbuffer to stderr...
(1) first
(2)
matched seq "^F" and btw meta was 0 (menus 1 = 8191)
matched seq "^F" and btw meta was 0 (menus 1 = 8191)
matched seq "M-A" and btw meta was 1 (menus 1 = 1)
matched seq "^F" and btw meta was 0 (menus 1 = 8191)
matched seq "^F" and btw meta was 0 (menus 1 = 8191)
matched seq "^U" and btw meta was 0 (menus 1 = 1)
Mark is on line 3, x=2; current line is 3, x=4.
Before: topdata is ''second'', x=4; bottomdata is ''second'', x=4.
After: topdata is '''', x=4; bottomdata is '''', x=4.
(5)
(4) nd
(3) secofirst
(2)
(1)
matched seq "^K" and btw meta was 0 (menus 1 = 1)
Blew away cutbuffer =)
Mark is on line 3, x=2; current line is 4, x=0.
Before: topdata is '''', x=2; bottomdata is ''nd'', x=0.
There it segfaults, which seems logical, because how can the
x position be 2 when the topdata is empty? I would have
expected the topdata to be ''secofirst'' here (or maybe
''cofirst'' and x=0). The ^U when the mark is on has
somehow confused something, it seems.
(The "Before:" and "After:" refer to the null_at and charmove
statements in partition_filestruct() in nano.c around line 240.)
Benno
--
http://www.fastmail.fm - A fast, anti-spam email service.