--- main_loop.c-orig 2014-12-11 02:44:53.239668678 -0500
+++ main_loop.c 2014-12-11 04:22:23.826563905 -0500
@@ -184,7 +184,8 @@
{ set_error_msg( "No current filename" ); return 0; }
if( !resize_buffer( &buf, &bufsz, pmax + 1 ) ) return 0;
for( n = 0; **ibufpp != '\n'; ++n, ++*ibufpp ) buf[n] = **ibufpp;
- buf[n] = 0;
+ while( isspace( buf[--n] ) ); /* drop trailing space */
+ buf[++n] = 0;
while( **ibufpp == '\n' ) ++*ibufpp; /* skip newline */
return ( may_access_filename( buf ) ? buf : 0 );
}