diff options
| author | Luke Kershaw <35707277+l-kershaw@users.noreply.github.com> | 2021-06-27 12:20:50 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-27 12:20:50 +0100 |
| commit | e5bd4963da81b5d044749ee4507061801aeb0f78 (patch) | |
| tree | d45394b249caba197eb908c10c84565928ca516e /lua/telescope | |
| parent | 6ac5ee0854fe02d651cadf2fc97a2463ff92f322 (diff) | |
fix: display issues in `:Telescope registers` (#940)
* fix: display issues in `:Telescope registers`
- Problems occured when a register contained newlines
- Caused issues in `Picker:set_selection`
- Couldn't move selection when a register with newlines was selected
Diffstat (limited to 'lua/telescope')
| -rw-r--r-- | lua/telescope/make_entry.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lua/telescope/make_entry.lua b/lua/telescope/make_entry.lua index 288a471..96be07f 100644 --- a/lua/telescope/make_entry.lua +++ b/lua/telescope/make_entry.lua @@ -664,9 +664,10 @@ function make_entry.gen_from_registers(_) } local make_display = function(entry) + local content = entry.content return displayer { {'[' .. entry.value .. ']', "TelescopeResultsNumber"}, - entry.content, + type(content) == 'string' and content:gsub('\n','\\n') or content, } end |
