[issue23735] Readline not adjusting width after resize with 6.3

2016-03-27 Thread Eric Price
Eric Price added the comment: Hmm, I'm not seeing comments in the review? You're right about the order. When we don't have sigaction, python's signal handler will reinstall itself, so we need to reinstall this one after calling the old handler. -- Added file: http://bugs.python.org

[issue23735] Readline not adjusting width after resize with 6.3

2016-03-26 Thread Eric Price
Eric Price added the comment: Well, I could piggyback on the existing flags if I just wanted to support readline -- there are already two flags for readline 4.0 -- but if our real goal is to be compatible with editline, we probably need another flag. I think you're right that it should

[issue23735] Readline not adjusting width after resize with 6.3

2016-03-22 Thread Eric Price
Eric Price added the comment: (To be clear, it now works in general for Python signal handlers, and when C handlers are inserted but not deleted.) For a conditional ifdef, does that mean I should add another test/variable in configure.ac

[issue23735] Readline not adjusting width after resize with 6.3

2016-03-22 Thread Eric Price
Eric Price added the comment: Hmm, OK. I've made a new version of the patch that chains signal handlers. I think that should make it match previous functionality, and work with basic combined usage or python signal handlers. It probably still won't work if you, say, want to start

[issue23735] Readline not adjusting width after resize with 6.3

2016-03-22 Thread Eric Price
Eric Price added the comment: rl_resize_terminal was added in readline 4.0, released in 1999. I think we can rely on it. =) I don't know editline, but it probably doesn't include the readline 6.3 change that makes this necessary, so your patch for it could just IFDEF out that line. I think

[issue23735] Readline not adjusting width after resize with 6.3

2015-10-27 Thread Eric Price
Eric Price added the comment: SIGWINCH handler for readline. Fixed indentation issues. -- Added file: http://bugs.python.org/file40870/rl_sigwinch_update.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue23735] Readline not adjusting width after resize with 6.3

2015-10-27 Thread Eric Price
Changes by Eric Price <ecpr...@gmail.com>: Removed file: http://bugs.python.org/file40844/rl_sigwinch_update.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue23735] Readline not adjusting width after resize with 6.3

2015-10-27 Thread Eric Price
Eric Price added the comment: At the moment, it just overwrites any existing SIGWINCH handler. I don't know how to do anything better -- one could try to store an existing SIGWINCH handler and call it, but it still wouldn't really work for an application that wanted to add and remove handlers

[issue23735] Readline not adjusting width after resize with 6.3

2015-10-22 Thread Eric Price
Eric Price added the comment: Hmm, hopefully the review tool works now. (I was generating the patch manually from a source tarball, not a checkout.) -- Added file: http://bugs.python.org/file40844/rl_sigwinch_update.patch ___ Python tracker <

[issue23735] Readline not adjusting width after resize with 6.3

2015-10-22 Thread Eric Price
Changes by Eric Price <ecpr...@gmail.com>: Removed file: http://bugs.python.org/file40843/rl_sigwinch_update.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue23735] Readline not adjusting width after resize with 6.3

2015-10-22 Thread Eric Price
Changes by Eric Price <ecpr...@gmail.com>: Removed file: http://bugs.python.org/file40837/rl_sigwinch_update.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue23735] Readline not adjusting width after resize with 6.3

2015-10-22 Thread Eric Price
Eric Price added the comment: Right, thanks, I've updated the patch. -- Added file: http://bugs.python.org/file40843/rl_sigwinch_update.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue23735] Readline not adjusting width after resize with 6.3

2015-10-22 Thread Eric Price
Eric Price added the comment: This patch seems to fix the issue for me, by installing a signal handler for SIGWINCH that sets a flag which is checked while waiting for input. One could make a simpler patch that just calls rl_resize_terminal() from the signal handler. That would essentially