|
115 | 115 | m - toggle method visibility |
116 | 116 | w - toggle line wrapping |
117 | 117 | n/insert - add new watch expression |
118 | | - e - edit options (also to delete) |
| 118 | + delete - remove watch expression |
| 119 | + e - edit options |
119 | 120 |
|
120 | 121 | Keys in stack list: |
121 | 122 | enter - jump to frame |
@@ -939,6 +940,11 @@ def change_var_state(w, size, key): |
939 | 940 | iinfo.wrap = not iinfo.wrap |
940 | 941 | elif key == "m": |
941 | 942 | iinfo.show_methods = not iinfo.show_methods |
| 943 | + elif key == "delete": |
| 944 | + fvi = self.get_frame_var_info(read_only=False) |
| 945 | + for i, watch_expr in enumerate(fvi.watches): |
| 946 | + if watch_expr is var.watch_expr: |
| 947 | + del fvi.watches[i] |
942 | 948 |
|
943 | 949 | self.update_var_view(focus_index=focus_index) |
944 | 950 |
|
@@ -1096,6 +1102,7 @@ def insert_watch(w, size, key): |
1096 | 1102 | self.var_list.listen("e", edit_inspector_detail) |
1097 | 1103 | self.var_list.listen("n", insert_watch) |
1098 | 1104 | self.var_list.listen("insert", insert_watch) |
| 1105 | + self.var_list.listen("delete", change_var_state) |
1099 | 1106 |
|
1100 | 1107 | self.var_list.listen("[", partial(change_rhs_box, "variables", 0, -1)) |
1101 | 1108 | self.var_list.listen("]", partial(change_rhs_box, "variables", 0, 1)) |
|
0 commit comments