GoogleCodeArchives / editra

Automatically exported from code.google.com/p/editra
Other
0 stars 0 forks source link

Editra editor screen partially flickers when typing a new line #427

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start typing in a new line
2.
3.

What is the expected output? What do you see instead?
No flickering

IMPORTANT!!! Please answer these questions for any and ALL bug reports

What version of the product are you using? On what operating system?
Editra 5.15

What method of install was your version installed with (Binary/Source)?
Source

If from source: What version of python and wxPython are you using?
Ubuntu 9.10 package
python-wxtools (2.8.10.1)

Please provide any additional information below.
The new line that I am starting flickers.  I am using a dark background
color theme.

Original issue reported on code.google.com by the.min...@gmail.com on 11 Nov 2009 at 3:48

GoogleCodeExporter commented 9 years ago
Hi,

I am unable to reproduce such behavior on any of my machines.

My linux test machine is a Pentium 3 900mhz, 368mb ram, and a cheap pci 
graphics card
in it, think I am running Ubuntu 9.04

What kind of hardware are you using? (processor, video, etc..)?

Do you have Compiz turned on? or other special desktop affects?

Thanks,

Cody

Original comment by CodyPrec...@gmail.com on 11 Nov 2009 at 4:30

GoogleCodeExporter commented 9 years ago
I am using Ubuntu 9.10, and I don't think I had this problem with Ubuntu 9.04.  
I
have Compiz on.  I turned off Compiz, and went back to Metacity -- the problem 
is
still there.  This is very annoying, to the point that I am discouraged from 
using
the editor.  I don't know whether this is a wxpython problem: I couldn't find
relevant info online.

Hardware:
Intel(R) Core(TM)2 Duo CPU     P8400  @ 2.26GHz
NVidia GeForce 9300M GS

Original comment by the.min...@gmail.com on 11 Nov 2009 at 4:44

GoogleCodeExporter commented 9 years ago
Moreover, try tabbing in the new line (starting a new line with an indent).  
This
makes that particular line flicker also (pretty badly).  I think the problem 
might be
with something that manages indentations and code folding.  Whenever the editor
window updates the left margin for code folding block bracket, the editor window
flickers.

Original comment by the.min...@gmail.com on 11 Nov 2009 at 4:44

GoogleCodeExporter commented 9 years ago
Hi,

The code folding is handled internally by the editor control (Scintilla). Not 
sure
why you would be getting flickering on a machine as fast as yours is and my old 
slow
one didn't. I will try to get my linux box out again this week sometime and 
double
check on there again.

Does the whole line flicker or just part of it?

Is there any difference if you turn off the line numbers or folding margins?

What kind of files are you editing? (each lexer implements its own folding)

Do you have the "Highlight Caret Line" feature enabled?

Cody

Original comment by CodyPrec...@gmail.com on 11 Nov 2009 at 4:54

GoogleCodeExporter commented 9 years ago
I have tried with folding margins off and line numbers off:  the problem still 
exists.
Highlight Caret line feature (on or off) does not affect the problem; the 
problem
still exits.

I am writing a python file.  

After much experimenting.  I think the problem comes in a repeatable manner 
when the
tab level of the new line just is changed from what was expected.  For example, 
if I
am writing a simple loop

for ii in range(0,10):
    ii = ii + 2
    print ii
print "all done"

When I try to type the third line ("print ..."), the whole line flickers.  Of 
course,
there are other cases when the line flickers.

A problem with something that came with Ubuntu 9.10?  I did not have this 
problem
with 9.04.

Original comment by the.min...@gmail.com on 11 Nov 2009 at 5:10

GoogleCodeExporter commented 9 years ago
Hi,

Thanks for the info. I will have to look into it deeper when I am on my Linux 
machine
and possibly update to 9.10. 

I don't think that indentation could have anything todo with this as it 
shouldn't
affect the drawing of the screen in anyway since its only whitespace. If you 
were
typing in an open string (i.e "hello ) there is the string_eol highlighting that
causes the line be highlighted slightly differently until the closing " is seen.

Possibilities are something changed in Ubuntu 9.10 or in wxPython 2.8.10 as 
IIRC I
have 2.8.8 on my linux machine.

One other possibility that comes to mind is that I think I remember reading 
about the
video card driver policy changing on Ubuntu, is it possible that you are 
running the
open source drivers instead of the closed nvidia provided ones. I could be 
wrong but
I think the closed ones used to be the default if an nvidia card was on the 
system
and in newer versions they use the open ones by default. I could see this 
affecting
screen drawing performance, but you would probably also notice it on other
applications as well.

Please try the attached test program and see if you can reproduce the issue 
there.

Thanks,

cody

Original comment by CodyPrec...@gmail.com on 11 Nov 2009 at 6:21

Attachments:

GoogleCodeExporter commented 9 years ago
Issue 430 has been merged into this issue.

Original comment by CodyPrec...@gmail.com on 17 Nov 2009 at 3:11

GoogleCodeExporter commented 9 years ago
I agree that indentation should not have anything to do with this, but somehow 
that
is what I am observing.

I have been using the proprietary nVidia driver for both 9.04 and 9.10.

I ran the test program.  I could *not* produce the error at all.

Original comment by the.min...@gmail.com on 18 Nov 2009 at 4:54

GoogleCodeExporter commented 9 years ago
I'm experiencing the same flicker with a dark background. I'm using Archlinux 
x86_64, a rolling release distro, so it's usually up to date. I ran the test 
program and couldn't reproduce the problem. I've noticed in my setup it only 
flickers in some files when I first start to type at the begging of a line, 
others more frequently. Sometimes it flickers when I scroll with the arrow keys 
or page up/down.

See the attached file for flickering when starting a new line.

My specs are
wxpython - 2.8.11.0-1
python - 2.6.5-3
Editra - 0.5.72
kernel - 2.6.34-ARCH SMP PREEMPT

Gigabyte GA-MA78BM-S2H
AMD Phenom(tm) 8450 Triple-Core Processor
8GB ddr2 ram

nVidia 9600GT w/514mb ram
nVidia proprietary drivers - 256.35-1

Asus VW246H lcd monitor

Openbox window manager
no compiz or 3d of any kind

Original comment by outerrimlogging@gmail.com on 30 Jul 2010 at 11:14

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks,

Will have to resurrect my linux box to test.

I just thought of one more thing to try as a test to narrow the issue down. Is 
there any change in behavior if you turn of the Bracket Highlighting option?

Cody

Original comment by CodyPrec...@gmail.com on 31 Jul 2010 at 12:10

GoogleCodeExporter commented 9 years ago
Cody:

I turned off bracket highlighting and it had no effect so I went to the 
settings menu and turned all the options off.

Result = No flicker

I turned on one item at a time from the top down until I got the flicker to 
start.

Result = syntax highlighting = flicker.

If you don't want to resurrect your linux box, send me the changes. With the 
Arch build system it's easy to build and test. I don't mind at all. It's all 
done under the package manager so I can always rebuild and install 0.5.7.2 and 
use it late. 

Original comment by outerrimlogging@gmail.com on 31 Jul 2010 at 3:18

GoogleCodeExporter commented 9 years ago
Cody:

I went back and tried to duplicate the problem with all the styles. It happens 
with any of them, even the light backgrounds. The way I caught it on the light 
backgrounds was typing on a line right above a comment line. I've also noticed 
it seems worse when typing very quickly.

Another thing I forgot to mention is it happens when I backspace out some text 
and hit the left margin with the backspace key.

Sorry for the extra entry. I should have already tried this before I got back 
to you.

Myra

Original comment by outerrimlogging@gmail.com on 31 Jul 2010 at 3:46

GoogleCodeExporter commented 9 years ago
Reproduced (finally)

Ubuntu 11.04

Appears the text control is redrawing a rectangle when it updates the marker 
margin.

Did some testing and if I send commands to the buffer to completely turn of 
code folding then it does not flicker anymore. Currently turning off the 
folding from the UI just hides the margin the buffer is still processing the 
folding information in the background.

Will add a change to do this when turning off code folding.

Original comment by CodyPrec...@gmail.com on 1 Jun 2011 at 10:42

GoogleCodeExporter commented 9 years ago
The root cause is upstream, I am thinking it will probably be fixed by wxPython 
2.9.

I have committed a change as a workaround that now when you turn of code 
folding it will turn it off completely instead of just hiding the margin. This 
stops the flashing caused by the editor control updating the fold margin 
markers.

Closing as Fixed 

Original comment by CodyPrec...@gmail.com on 2 Jun 2011 at 2:15