zsh-users
 help / color / mirror / code / Atom feed
* Bug in bracketed-paste-magic
@ 2016-02-14  0:18 Eric Freese
  2016-02-14 19:29 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Freese @ 2016-02-14  0:18 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 1144 bytes --]

Hi,

I'm developing an autosuggest plugin at
https://github.com/tarruda/zsh-autosuggestions and have been looking into
an issue (#102 in that repo) that occurs when bracketed-paste-magic is
enabled. I've tracked it down to the `bracketed-paste-magic` function
making a call to `zle` without the `-w` flag. It seems to me this is a bug
in bracketed-paste-magic- that it should be using the `-w` flag to set
$WIDGET and associated parameters when invoking a possibly user-defined
widget. Would adding the `-w` flag here possibly break anything else?

I'm not very familiar with the best way to get this patched, but I've
forked the repo on GitHub and pushed a commit that adds the `-w` flag. It's
available at
https://github.com/ericfreese/zsh/commit/ff23295570e477a6f4b4c1c1e0f97eddc277bcd9

The relevant github issue for my plugin:
https://github.com/tarruda/zsh-autosuggestions/issues/102

Cheers,
Eric Freese

P.S. Another concern (though it's really a separate issue) is the `zle
undo` later in the file. Shouldn't that be `zle .undo` to avoid any
potential problems arising from the `undo` widget being overridden by a
user-defined widget?

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Bug in bracketed-paste-magic
  2016-02-14  0:18 Bug in bracketed-paste-magic Eric Freese
@ 2016-02-14 19:29 ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2016-02-14 19:29 UTC (permalink / raw)
  To: zsh-users

[Aside: zsh-users is propagated to zsh-workers, so there's no need to send
separate messages to each.]

On Feb 13,  5:18pm, Eric Freese wrote:
}
} [...] It seems to me this is a bug
} in bracketed-paste-magic- that it should be using the `-w` flag to set
} $WIDGET and associated parameters when invoking a possibly user-defined
} widget. Would adding the `-w` flag here possibly break anything else?

Good catch.

} I'm not very familiar with the best way to get this patched

Mailing a diff to this list is the usual way, but you've succeeded. :-)

} The relevant github issue for my plugin:
} https://github.com/tarruda/zsh-autosuggestions/issues/102

The initial description there sounds exactly like the problem we had
with multi-byte input and "zle -U".  Any idea what user-defined widget
caused the problem?

} P.S. Another concern (though it's really a separate issue) is the `zle
} undo` later in the file. Shouldn't that be `zle .undo` to avoid any
} potential problems arising from the `undo` widget being overridden by a
} user-defined widget?

Seems reasonable.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-14 19:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-14  0:18 Bug in bracketed-paste-magic Eric Freese
2016-02-14 19:29 ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).