Thread: Paste bug in Query Tool

Paste bug in Query Tool

From
"Magnus Hagander"
Date:
Hi!

When you paste a multiline query in the query tool, where any line
*except* the last one is very long, the scrollbar doesn't resize, thus
making it impossible to scroll the whole query into view. A workaround
is to click this row and press "end", or to manually move out to the end
of it, in which case the scrollbar resizes. This is also what happens if
you paste a long single-line query - since the cursor is placed at the
end of the long line automatically.

Example query (no linebreaks except when specified as a different line)
<first line>
select * from foo where bar=1 and bar=1 and bar=1 and bar=1 and bar=1
and bar=1 and bar=1 and bar=1 and bar=1 and bar=1 and bar=1 and bar=1
and bar=1 and bar=1 and bar=1 and bar=1 and bar=1 and bar=1 and bar=1
and bar=1 and bar=1 and bar=1 and bar=1 and bar=1 and bar=1 and bar=1
and bar=1 and bar=1 and bar=1 and bar=1 and bar=1 and bar=1 and bar=1
and bar=1 and bar=1 and bar=1 and bar=1 and bar=1 and bar=1 and bar=1
and bar=1 and bar=1 and bar=1 and bar=1 and bar=1 and bar=1 and bar=1
and bar=1
<second line>
and foo=2 and foo=2
<end of second line>

The query has to be long enough so the scrollbar would require resizing.


I guess this might be an actual bug in the wx control, but perehaps
there's some kind of workaround we can apply automatically? (Or if the
bug is in pgAdmin, it can hopefully be fixed :P)

//Magnus

Re: Paste bug in Query Tool

From
"Dave Page"
Date:

> -----Original Message-----
> From: pgadmin-hackers-owner@postgresql.org
> [mailto:pgadmin-hackers-owner@postgresql.org] On Behalf Of
> Magnus Hagander
> Sent: 09 January 2006 10:01
> To: pgadmin-hackers@postgresql.org
> Subject: [pgadmin-hackers] Paste bug in Query Tool
>
> Hi!
>
> When you paste a multiline query in the query tool, where any line
> *except* the last one is very long, the scrollbar doesn't resize, thus
> making it impossible to scroll the whole query into view. A workaround
> is to click this row and press "end", or to manually move out
> to the end
> of it, in which case the scrollbar resizes. This is also what
> happens if
> you paste a long single-line query - since the cursor is placed at the
> end of the long line automatically.
>
> Example query (no linebreaks except when specified as a
> different line)
> <first line>
> select * from foo where bar=1 and bar=1 and bar=1 and bar=1 and bar=1
> and bar=1 and bar=1 and bar=1 and bar=1 and bar=1 and bar=1 and bar=1
> and bar=1 and bar=1 and bar=1 and bar=1 and bar=1 and bar=1 and bar=1
> and bar=1 and bar=1 and bar=1 and bar=1 and bar=1 and bar=1 and bar=1
> and bar=1 and bar=1 and bar=1 and bar=1 and bar=1 and bar=1 and bar=1
> and bar=1 and bar=1 and bar=1 and bar=1 and bar=1 and bar=1 and bar=1
> and bar=1 and bar=1 and bar=1 and bar=1 and bar=1 and bar=1 and bar=1
> and bar=1
> <second line>
> and foo=2 and foo=2
> <end of second line>
>
> The query has to be long enough so the scrollbar would
> require resizing.
>
>
> I guess this might be an actual bug in the wx control, but perehaps
> there's some kind of workaround we can apply automatically? (Or if the
> bug is in pgAdmin, it can hopefully be fixed :P)

You can also use the scroll arrow at the end of the scrollbar to get to
the end of the line, just not the scrollbar itself.

This is definitely a bug in the Scintilla control itself though - I can
reproduce it in the Scite editor so somehow we need to get a fix into
that, then get it refreshed into wx, and finally up to pgAdmin!

I'll start with the wx guys....

/D