ren: do not execute tr.c requests when a character is queued in ren.c
commit15fdd6eed8b3fbf509de2dc11e4ea1ac7564d19b
authorAli Gholami Rudi <ali@rudi.ir>
Fri, 18 Jul 2014 09:44:35 +0000 (18 14:14 +0430)
committerAli Gholami Rudi <ali@rudi.ir>
Fri, 18 Jul 2014 09:44:35 +0000 (18 14:14 +0430)
tree08f5fd872bdd5034e8803f7d7e3015970b20bb9c
parentc380cf15117112369d834b462b6ed4355c902a33
ren: do not execute tr.c requests when a character is queued in ren.c

Functions like ren_tab() may push back a newline with ren_back().  If
tr_nextreq() is called unconditionally, the newline may be read in the
wrong order (after executing its following request).  The queued
newline may also result in pushing an extra newline with in_push() in
trap_exec().  This patch handles these cases.

Reported by Dirk-Wilhelm Peters <peters@schwertfische>.
ren.c