summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/testsuite/gdb.base/wrap-line.exp6
-rw-r--r--gdb/testsuite/gdb.tui/wrap-line.exp6
-rw-r--r--gdb/utils.c2
3 files changed, 1 insertions, 13 deletions
diff --git a/gdb/testsuite/gdb.base/wrap-line.exp b/gdb/testsuite/gdb.base/wrap-line.exp
index 938b5c44099..03d94720c9c 100644
--- a/gdb/testsuite/gdb.base/wrap-line.exp
+++ b/gdb/testsuite/gdb.base/wrap-line.exp
@@ -86,12 +86,6 @@ proc test_wrap { width_auto_detected } {
gdb_assert { $gdb_width == [expr $readline_width + 1] }
}
- if { $width_auto_detected && $::term == "ansi" } {
- if { $gdb_width == [expr $env_width - 1] || $gdb_width == $env_width } {
- # Generate KFAIL or KPASS.
- setup_kfail "cli/30346" "*-*-*"
- }
- }
gdb_assert { $gdb_width == $env_width } "width"
# New prompt, but avoid emitting a pass in order to avoid ending the line
diff --git a/gdb/testsuite/gdb.tui/wrap-line.exp b/gdb/testsuite/gdb.tui/wrap-line.exp
index b28170808b8..f1e07a7decd 100644
--- a/gdb/testsuite/gdb.tui/wrap-line.exp
+++ b/gdb/testsuite/gdb.tui/wrap-line.exp
@@ -92,12 +92,6 @@ proc test_wrap_cli_tui { auto_detected_width } {
}
}
- if { $auto_detected_width } {
- if { $gdb_width == [expr $::cols - 1] || $gdb_width == $::cols } {
- # Generate KFAIL or KPASS.
- setup_kfail "cli/30346" "*-*-*"
- }
- }
gdb_assert { $gdb_width == $::cols } "width"
# TERM=ansi, so readline hides the last column.
diff --git a/gdb/utils.c b/gdb/utils.c
index 0347496e431..f18228d1086 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -1161,7 +1161,7 @@ init_page_info (void)
readline_hidden_cols = _rl_term_autowrap ? 0 : 1;
lines_per_page = rows;
- chars_per_line = cols;
+ chars_per_line = cols + readline_hidden_cols;
/* Readline should have fetched the termcap entry for us.
Only try to use tgetnum function if rl_get_screen_size