Re: [patch] fix another End keypress lockup in the viewer

2005-08-15 Thread Pavel Tsekov
Hello, On Sun, 14 Aug 2005, Jindrich Makovicka wrote: the new viewer has a problem with viewing files with DOS line separators, which manifests again in a lockup after pressing the End key. Then, it is impossible to move the view further, except by pressing the Home key. It is caused by

Re: [patch] fix another End keypress lockup in the viewer

2005-08-15 Thread Roland Illig
Jindrich Makovicka wrote: Hello, the new viewer has a problem with viewing files with DOS line separators, which manifests again in a lockup after pressing the End key. Then, it is impossible to move the view further, except by pressing the Home key. Can you provide a file where that lockup

Re: [patch] fix another End keypress lockup in the viewer

2005-08-15 Thread Pavel Tsekov
Hello, On Mon, 15 Aug 2005, Roland Illig wrote: Jindrich Makovicka wrote: Hello, the new viewer has a problem with viewing files with DOS line separators, which manifests again in a lockup after pressing the End key. Then, it is impossible to move the view further, except by pressing

Re: [patch] fix another End keypress lockup in the viewer

2005-08-15 Thread Roland Illig
Pavel Tsekov wrote: Are you kidding ? Have you tried with the file I've sent you ? I've debugged the problem and there is no way that it wont happen. Are you using the correct MC binary ? I am using mc-HEAD with the exception of src/view.c, which I took from yesterday. I extracted the file

Re: [patch] fix another End keypress lockup in the viewer

2005-08-15 Thread Pavel Tsekov
Hello, On Mon, 15 Aug 2005, Roland Illig wrote: Pavel Tsekov wrote: Are you kidding ? Have you tried with the file I've sent you ? I've debugged the problem and there is no way that it wont happen. Are you using the correct MC binary ? I am using mc-HEAD with the exception of

Re: [patch] fix another End keypress lockup in the viewer

2005-08-15 Thread Roland Illig
Pavel Tsekov wrote: Another approach would be to simplify the following code from view_move_up(): } else if (line = 1) { view_coord_to_offset (view, linestart, line, 0); view_offset_to_coord (view, line, col, linestart - 1); /* if the

Re: [patch] fix another End keypress lockup in the viewer

2005-08-15 Thread Pavel Tsekov
Hello, On Mon, 15 Aug 2005, Roland Illig wrote: Because we are in text wrap mode. Internally the viewer stores the unwrapped coordinates. When you want to go one line up, you have to distinguish whether you are inside a long line or at the beginning of a line. This is what the code does.

Re: [patch] fix another End keypress lockup in the viewer

2005-08-15 Thread Roland Illig
Pavel Tsekov wrote: Hello, On Mon, 15 Aug 2005, Roland Illig wrote: Because we are in text wrap mode. Internally the viewer stores the unwrapped coordinates. When you want to go one line up, you have to distinguish whether you are inside a long line or at the beginning of a line. This is

[patch] fix another End keypress lockup in the viewer

2005-08-14 Thread Jindrich Makovicka
Hello, the new viewer has a problem with viewing files with DOS line separators, which manifests again in a lockup after pressing the End key. Then, it is impossible to move the view further, except by pressing the Home key. It is caused by the code of view_move_up, which moves by one line using