Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix resize not working after entering command (#845) #846

Merged
merged 1 commit into from
Jul 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ case "$ax_cv_ncursesw" in "no")
esac
AC_SUBST(CURSES_LIBS)

AX_LIB_READLINE(6.2)
AX_LIB_READLINE(6.3)

AM_ICONV

Expand Down
4 changes: 4 additions & 0 deletions src/prompt.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,10 @@ readline_init(void)
rl_attempted_completion_function = readline_completion;

rl_completion_display_matches_hook = readline_display_matches;

/* Let ncurses deal with the LINES and COLUMNS environment variables */
rl_change_environment = 0;
rl_catch_sigwinch = 0;
}

static void sigint_absorb_handler(int sig) {
Expand Down
28 changes: 15 additions & 13 deletions tools/ax_lib_readline.m4
Original file line number Diff line number Diff line change
Expand Up @@ -211,21 +211,23 @@ AC_DEFUN([AX_LIB_READLINE], [
[search for readline in DIR/include and DIR/lib])],
[ac_cv_rl_prefix=$with_readline])

AC_CHECK_HEADERS([readline/readline.h], [
AC_CHECK_HEADERS([readline/history.h], [
RL_LIB_READLINE_VERSION
AS_IF([test "x$with_readline" != xno], [
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these changes made manually or did you update it to the newest version of this file?

Copy link
Collaborator Author

@koutcher koutcher Jul 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Manually. It looks like the code mentioned in the header has not been modified since.

AC_CHECK_HEADERS([readline/readline.h], [
AC_CHECK_HEADERS([readline/history.h], [
RL_LIB_READLINE_VERSION
])
])
])

if test $RL_MAJOR -ge $RL_MAJOR_REQUIRED || {
test $RL_MAJOR = $RL_MAJOR_REQUIRED && test $RL_MINOR -ge $RL_MINOR_REQUIRED ; } ; then
LIBS="$LIBS -lreadline ${TERMCAP_LIB}"
CFLAGS="$CFLAGS -I${RL_INCLUDEDIR}"
LDFLAGS="$LDFLAGS -L${RL_LIBDIR}"
if test $RL_MAJOR -gt $RL_MAJOR_REQUIRED || {
test $RL_MAJOR = $RL_MAJOR_REQUIRED && test $RL_MINOR -ge $RL_MINOR_REQUIRED ; } ; then
LIBS="$LIBS -lreadline ${TERMCAP_LIB}"
CFLAGS="$CFLAGS -I${RL_INCLUDEDIR}"
LDFLAGS="$LDFLAGS -L${RL_LIBDIR}"

AC_DEFINE(HAVE_READLINE, 1, [Define if you have a GNU readline compatible library])
AC_DEFINE(HAVE_READLINE, 1, [Define if you have a GNU readline compatible library])

elif test -n "$ac_cv_rl_prefix"; then
AC_MSG_WARN([Minimum required version of readline is $RL_VERSION_REQUIRED])
fi
elif test -n "$ac_cv_rl_prefix"; then
AC_MSG_WARN([Minimum required version of readline is $RL_VERSION_REQUIRED])
fi
])
])