- Subject: Re: pasting text using the X clipboard
- From: "G. Milde" <g.milde@xxxxxx>
- Date: Tue, 12 Sep 2006 09:47:33 +0200
On 12.09.06, Juergen Lemke wrote:
> Is there a way to automate this process? Is it
> possible for jed to figure out that text is being
> pasted from the X clipboard and temporarily revert to
> "no mode" before the text is inserted?
My workaround for this problem uses the input_pending() function to guess
whether the newline char comes from a paste operation or the <Return> key:
!if (is_defined("x_server_vendor")) % not needed in xjed
setkey("newline_indent", "^M"); % correct mouse-insertion problem
with
public define newline_indent()
{
if (input_pending(0))
newline();
else
call("newline_and_indent");
}
This has the advantage, that you do not need any special action or
keypress before the paste. It could err (to the side of not
auto-indenting) if you type faster than jed can process the input.
Günter
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2006 date index]
[2006 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]