gyscos / gyscos/cursive

Issue with tab character in SelectView item

Open
#363 2 comments 0 reactions 0 assignees View on GitHub
internals
Dominant language
Rust
Stars
4.8k
Forks
270
Avg merge
5d 19h
Merged PRs (30d)
2

Description

This is a bug report

# Problem description

When adding an item containing a tab character in a SelectView the text is truncated.

Some code to reproduce the issue:
```
extern crate native_tls;

use cursive::traits::*;
use cursive::views::{Dialog, SelectView};
use cursive::Cursive;

fn main() {
let mut select = SelectView::new();

select.add_item("there is a \ttab", 1);
select.add_item("there is no tab", 2);

let mut siv = Cursive::default();

siv.add_layer(
Dialog::around(select.fixed_size((20, 10)))
);

siv.run();
}
```

Here is the output I get:
![image](https://user-images.githubusercontent.com/53949/62136014-97772900-b2e3-11e9-92e2-55fd6706301f.png)

# Environment

* Operating system: Ubuntu 19.04
* Backend used: ncurses 6.1
* Current locale: en_US.UTF-8
* Cursive version: 0.12.0

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.