Skip to content

Commit

Permalink
Fix bug with cursor location introduced by setting window background
Browse files Browse the repository at this point in the history
  • Loading branch information
jeff-hughes committed Nov 24, 2020
1 parent 4f3b670 commit 4aad0fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/ui/notification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ impl NotifWin {
// otherwise, there was a notification before but there
// isn't now, so erase
self.window.erase();
self.window.bkgd(pancurses::ColorPair(
self.window.bkgdset(pancurses::ColorPair(
self.colors.get(ColorType::Normal) as u8
));
self.window.refresh();
Expand Down Expand Up @@ -251,7 +251,7 @@ impl NotifWin {
);
oldwin.delwin();

self.window.bkgd(pancurses::ColorPair(
self.window.bkgdset(pancurses::ColorPair(
self.colors.get(ColorType::Normal) as u8
));
if let Some(curr) = &self.current_msg {
Expand Down
4 changes: 2 additions & 2 deletions src/ui/panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ impl Panel {

/// Redraws borders and refreshes the window to display on terminal.
pub fn refresh(&self) {
self.window.bkgd(pancurses::ColorPair(
self.window.bkgdset(pancurses::ColorPair(
self.colors.get(ColorType::Normal) as u8
));
self.draw_border();
Expand Down Expand Up @@ -99,7 +99,7 @@ impl Panel {
/// not refresh the screen.
pub fn erase(&self) {
self.window.erase();
self.window.bkgd(pancurses::ColorPair(
self.window.bkgdset(pancurses::ColorPair(
self.colors.get(ColorType::Normal) as u8
));
self.draw_border();
Expand Down

0 comments on commit 4aad0fc

Please sign in to comment.