Ticket #67 (new enhancement) — at Initial Version

Opened 15 years ago

Last modified 7 years ago

savannah: x selection in editor

Reported by: slavazanko Owned by:
Priority: major Milestone: Future Releases
Component: mcedit Version: master
Keywords: Cc: zaytsev, gotar@…
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

Original: http://savannah.gnu.org/bugs/?19651

Submitted by:me <me4mc>Submitted on:Sat 21 Apr 2007 10:25:44 AM UTC
Category:EditorSeverity:3 - Normal
Status:NonePrivacy:Public
Assigned to:NoneOpen/Closed:Open
Release:4.6.1Operating System:GNU/Hurd

Discussion:

Thu 26 Apr 2007 04:16:10 PM UTC, comment #8:

Does it help if you disable "Return does autoindent" from
Options -> General in the editor ?
	Pavel Tsekov <ptsekov>
Project Administrator
Sun 22 Apr 2007 09:32:43 PM UTC, comment #7:

bug in a bugfix...
i noticed bad flicker in the console and realized that the setcolor 
function does force a screen redraw.

therefore i moved its call to edit.c init()

now i get a green blinking _ in the console (no X) when i quit mc - 
much less anoying than the flicker.

any suggestions how to fix that?
	me <me4mc>
Sun 22 Apr 2007 09:56:32 AM UTC, comment #6:

mhh i browsed this menu @savannah and found that there is a 
difference between patch and bug and the bugs i submitted could have
 been patches - sorry for the trouble that might have caused, will 
use patches in future
	me <me4mc>
Sun 22 Apr 2007 09:50:04 AM UTC, comment #5:

yes it is!
because it is a feature that already works in other situations 
(single line)

reproduce:
start xterm
start mc in xterm
go to a file with newlines (eg COPYING)
edit it (F4)

press SHIFT and click-select some content over lines, do NOT use the
 mc cooledit buffer.

paste the selected text (using MIDDLE mouse) in a application like 
email or in the same editor, notice the blanks.

try the same if you cat the file on the terminal and notice that no 
blanks are in the other app:

example:
without patch (sorry bad to see)
SOL>
<EOL
SOL> Preamble
<- EOL
SOL> <EOL

with patch, or using nano or cat:

<EOL
Preamble<EOL
<EOL

i know that there are many terminals arround - maybe xterm isnt a 
good choice - maybe i have no choice at all

peace
	me <me4mc>
Sun 22 Apr 2007 09:31:31 AM UTC, comment #4:

Is it so hard to write a proper bug report ? I want to reproduce the
 problem myself and I couldn't - I failed because the lack of 
information. It is not correct to assume that everything has the 
same problem as you do. And how can I apply a patch if I do not 
understand what's going on.

I am sure Oswald can explain the problem to me but after all it is 
up to the submitter to describe the bug it sees.
	Pavel Tsekov <ptsekov>
Project Administrator
Sun 22 Apr 2007 09:22:16 AM UTC, comment #3:

i dont like the idea of changing the terminal just because a 
application misbehaves. my workarround for several years is to cat 
the current file - hopefully it's not a 60M log...

therefore created a patch (that only works for slang and mc 4.6.1) 
that uses a clear eol function to perform the action of clearing the
rest of the current line.
selection works fine for me now, but the display flickers on 
movement - something i can handle

@pavel: did you even read the post? the solution was in it - i hope 
in future we can improve understanding!

to make it work as described i had to create a new function in 
color.c&h that resets the color index 0. if anything simmilar exists
 please adopt the idea.

i dont care if this ever ends up in the main tree - it would save me
 the trouble of patching. once a year..

gentoo ebuild with use flag in testing phase maybe apears in sunrise
 overlay

peace
me
	me <me4mc>
Sat 21 Apr 2007 11:41:25 AM UTC, comment #2:

i understood immediately what he means. :-P

me: you can configure most *terms to strip trailing whitespace from 
the selection. without this, i would have freaked out long ago. :)
	Oswald Buddenhagen <ossi>
Sat 21 Apr 2007 11:20:23 AM UTC, comment #1:

Please, calm down. Finding a problem is the easy part - describing 
it properly, so that others can reproduce it, is of great importance
 if you want to get the problem solved.

From you bug report it is clear that you see some problem related 
the way copy/paste works in relation to the internal editor. 
However, I cannot understand what is actually wrong - please, do the
 following:

1) explain what do you do - copy/paste from where to where ?
2) explain what happens
3) explain what do you expect to happen
	Pavel Tsekov <ptsekov>
Project Administrator
Sat 21 Apr 2007 10:25:44 AM UTC, original submission:

i managed to find another x problem:
when you are in the *term and select some text all newlines are lost
 and filled up with spaces.

i managed to find the problem in the
editordraw.c in print_to_widget
the hline draws blanks at the rest of the line.

i understand that behaviour but there is a possibility to do this right:

SLtt_set_color (DEFAULT_COLOR_INDEX, NULL, "default", "default");
SLsmg_erase_eol();
or
clrtoeol()

however, i tryed to create that behaviour and failed because i 
cannot set the default color index (0) to blue/white.
the problem is that users with other color settings (me: 
black/green) could be angy if i hardcode blue/white

the default state is black/white - looks ugly but works.

if you could suggest how to properly set the fg/bg

should i create a new function in src/color.h?

any suggestions? 

Change History

Changed 15 years ago by slavazanko

added by me4mc

Changed 15 years ago by slavazanko

added by me4mc

Changed 15 years ago by slavazanko

added by me4mc

Note: See TracTickets for help on using tickets.