summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2011-03-22 21:22:16 +0100
committerhut <hut@lavabit.com>2011-03-22 21:22:16 +0100
commitc7fcbcf76ef379e279dbfb830eecf32350de688c (patch)
tree4fe6a500f7d70e258b41a032b8a990fa45910b75
parentdffc317f2df42b73304bd2119bdcfa15c88fe4eb (diff)
downloadranger-c7fcbcf76ef379e279dbfb830eecf32350de688c.tar.gz
gui.ui: clear the message in statusbar after a keypress
-rw-r--r--ranger/core/actions.py2
-rw-r--r--ranger/gui/ui.py2
-rw-r--r--ranger/gui/widgets/statusbar.py5
3 files changed, 7 insertions, 2 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index 7b721229..4ea4cfbf 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -802,7 +802,7 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware):
 		self.loader.add(obj)
 
 	def delete(self):
-		self.notify("Deleting!", duration=1)
+		self.notify("Deleting!")
 		selected = self.env.get_selection()
 		self.env.copy -= set(selected)
 		if selected:
diff --git a/ranger/gui/ui.py b/ranger/gui/ui.py
index 2f27f11e..a2babed8 100644
--- a/ranger/gui/ui.py
+++ b/ranger/gui/ui.py
@@ -139,6 +139,8 @@ class UI(DisplayableContainer):
 		if DisplayableContainer.press(self, key):
 			return
 
+		self.status.clear_message()
+
 		self.env.keymanager.use_context('browser')
 		self.env.key_append(key)
 		kbuf = self.env.keybuffer
diff --git a/ranger/gui/widgets/statusbar.py b/ranger/gui/widgets/statusbar.py
index 2f3c67cf..b7ab123c 100644
--- a/ranger/gui/widgets/statusbar.py
+++ b/ranger/gui/widgets/statusbar.py
@@ -53,9 +53,12 @@ class StatusBar(Widget):
 	def request_redraw(self):
 		self.need_redraw = True
 
-	def notify(self, text, duration=4, bad=False):
+	def notify(self, text, duration=0, bad=False):
 		self.msg = Message(text, duration, bad)
 
+	def clear_message(self):
+		self.msg = None
+
 	def draw(self):
 		"""Draw the statusbar"""
 
> 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 ) (isearch-allow-scroll t) (isearch-yank-on-move 'shift) (isearch-lazy-count t) :bind-keymap ("C-c s" . search-map) ;; M-s clashes with paredit/smartparens bindings :bind ("C-*" . isearch-forward-symbol-at-point) (:map search-map ("M-s M-<" . isearch-beginning-of-buffer) ("M-s M->" . isearch-end-of-buffer) ("C-c s M-<" . isearch-beginning-of-buffer) ("C-c s M->" . isearch-end-of-buffer))) (use-package isearch-dabbrev :after isearch :bind (:map isearch-mode-map ("M-/" . isearch-dabbrev-expand))) (use-package anzu :diminish :config (global-anzu-mode) (set-face-attribute 'anzu-mode-line nil :foreground "yellow" :weight 'bold) :custom (anzu-deactivate-region t) (anzu-search-threshold 1000) (anzu-replace-threshold 100) (anzu-replace-to-string-separator " => ") :bind ([remap query-replace] . anzu-query-replace) ([remap query-replace-regexp] . anzu-query-replace-regexp) (:map isearch-mode-map ([remap isearch-query-replace] . anzu-isearch-query-replace) ([remap isearch-query-replace-regexp] . anzu-isearch-query-replace-regexp))) (use-package rg :bind (:map search-map ("s" . rg)) ("C-c C-M-S-r" . rg-menu) ("C-c C-M-r" . rg) ("C-z" . rg-dwim)) (use-package deadgrep :config (defun deadgrep-symbol-at-point () (interactive) (deadgrep (thing-at-point 'symbol))) :bind (:map search-map ("d" . deadgrep) ("D" . deadgrep-symbol-at-point)) ("C-S-z" . deadgrep-symbol-at-point) ("C-c c d" . deadgrep)) (use-package affe :config (setq affe-grep-command (replace-regexp-in-string "\\." "-Suu ." affe-grep-command)) ;; Configure Orderless (defun affe-orderless-regexp-compiler (input _type _ignorecase) (setq input (orderless-pattern-compiler input)) (cons input (lambda (str) (orderless--highlight input str)))) (setq affe-regexp-compiler #'affe-orderless-regexp-compiler) ;; Manual preview key for `affe-grep' (consult-customize affe-grep :preview-key (kbd "M-.")) (defun my/affe-grep-symbol-at-point (&optional dir initial) (interactive (list prefix-arg (when-let ((s (symbol-at-point))) (symbol-name s)))) (affe-grep dir initial)) (defun my/affe-find-symbol-at-point (&optional dir initial) (interactive (list prefix-arg (when-let ((s (symbol-at-point))) (symbol-name s)))) (affe-find dir initial)) :bind (:map search-map ("#" . affe-grep) ("~" . my/affe-grep-symbol-at-point) ("a" . affe-find) ("A" . my/affe-find-symbol-at-point)) ("C-#" . affe-grep) ("C-c z" . affe-find) ("C-c Z" . my/affe-find-symbol-at-point) ("C-~" . my/affe-grep-symbol-at-point)) (provide 'init-search) ;;; init-search.el ends here 61'>761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010