remove debug prints

This commit is contained in:
Michael Sippel 2023-11-29 17:37:47 +01:00
parent d15077aca0
commit 39fbae7740
Signed by: senvas
GPG key ID: F96CF119C34B64A6
7 changed files with 0 additions and 21 deletions

View file

@ -43,7 +43,6 @@ impl ObjCommander for DigitEditor {
self.msg.clear();
if self.ctx.read().unwrap().meta_chars.contains(&c) {
eprintln!("digitedit: meta char");
return TreeNavResult::Exit;
} else if c.to_digit(self.radix).is_none() {

View file

@ -57,7 +57,6 @@ impl ObjCommander for ListEditor {
}
else if let Some(cmd) = cmd_repr.get_view::<dyn SingletonView<Item = ListCmd>>() {
eprintln!("pty-list-editor some list cmmd");
let cur = self.cursor.get();
drop(cmd_repr);
@ -76,7 +75,6 @@ impl ObjCommander for ListEditor {
match cmd.get() {
ListCmd::DeletePxev => {
eprintln!("SELECT: delete pxev");
if idx > 0
&& item_cur.tree_addr.iter().fold(
true,
@ -118,7 +116,6 @@ impl ObjCommander for ListEditor {
}
}
} else {
eprintln!("ptylist: no item");
TreeNavResult::Exit
}
},
@ -126,7 +123,6 @@ impl ObjCommander for ListEditor {
ListCursorMode::Insert => {
match cmd.get() {
ListCmd::DeletePxev => {
eprintln!("INSERT: delete pxev");
self.delete_pxev();
TreeNavResult::Continue
}
@ -149,7 +145,6 @@ impl ObjCommander for ListEditor {
}
}
} else {
eprintln!("ptylist: cursor has no idx");
TreeNavResult::Exit
}
}

View file

@ -55,7 +55,6 @@ impl ListEditor {
if idx >= 0 && idx < data.len() as isize {
data.get(idx as usize).read().unwrap().get_mode_view()
} else {
eprintln!("ListEditor::mode_port invalid cursor idx");
ip
}
} else {
@ -242,7 +241,6 @@ impl ListEditor {
if self.is_listlist() {
cur.mode = ListCursorMode::Select;
} else {
eprintln!("list insert: is not a listlist ({:?})", self.typ);
item.write().unwrap().goto(TreeCursor::none());
cur.idx = Some(idx + 1);
}
@ -258,13 +256,11 @@ impl ListEditor {
self.cursor.set(cur);
} else {
//eprintln!("insert: no cursor");
}
}
/// split the list off at the current cursor position and return the second half
pub fn split(&mut self) {
eprintln!("split");
let cur = self.cursor.get();
if let Some(idx) = cur.idx {
let idx = idx as usize;
@ -299,7 +295,6 @@ impl ListEditor {
}
pub fn listlist_split(&mut self) {
eprintln!("listlist split");
let cur = self.get_cursor();
if let Some(mut item) = self.get_item().clone() {
@ -316,7 +311,6 @@ impl ListEditor {
tail_node.goto(TreeCursor::home());
for node in b.iter() {
eprintln!("splid :send to tail node");
tail_node
.send_cmd_obj(
ReprTree::new_leaf(

View file

@ -195,7 +195,6 @@ impl TreeNav for ListEditor {
TreeNavResult::Exit
} else if direction.y > 0 {
// dn
eprintln!("dn: data.len() = {}", self.data.len());
self.cursor.set(ListCursor {
mode: if self.data.len() > 0 { cur.leaf_mode } else { ListCursorMode::Insert },
idx: Some(0)
@ -367,7 +366,6 @@ impl TreeNav for ListEditor {
depth as isize - 1
};
eprintln!("<- LEFT CROSS: pxv_height = {}, cur_height = {}, dist_from_ground = {}, n_steps_down = {}", pxv_height, cur_height, dist_from_ground, n_steps_down);
new_addr.push( cur.tree_addr[0] - 1 );
for _i in 0..n_steps_down {
new_addr.push( -1 );
@ -387,7 +385,6 @@ impl TreeNav for ListEditor {
depth as isize - 1
};
eprintln!("-> RIGHT CROSS: cur_height = {}, nxd_height = {}, dist_from_ground = {}, n_steps_down = {}", cur_height, nxd_height, dist_from_ground, n_steps_down);
new_addr.push( cur.tree_addr[0] + 1 );
for _i in 0..n_steps_down {
new_addr.push( 0 );
@ -396,7 +393,6 @@ impl TreeNav for ListEditor {
drop(cur_item);
eprintln!("CROSS: goto {:?}", new_addr);
cur.tree_addr = new_addr;
self.goto(cur)
} else {

View file

@ -240,7 +240,6 @@ impl ObjCommander for TypeTermEditor {
self.set_state( State::Ladder );
}
} else {
eprintln!("ERROR");
}
} else {
self.set_state( State::AnySymbol );

View file

@ -285,7 +285,6 @@ impl TypeTermEditor {
}
pub fn normalize_empty(&mut self) {
eprintln!("normalize singleton");
let subladder_list_node = self.cur_node.get().clone();
let subladder_list_edit = subladder_list_node.get_edit::<ListEditor>().unwrap();
@ -298,7 +297,6 @@ impl TypeTermEditor {
/* unwrap a ladder if it only contains one element
*/
pub fn normalize_singleton(&mut self) {
eprintln!("normalize singleton");
if self.state == State::Ladder {
let subladder_list_node = self.cur_node.get().clone();
@ -362,7 +360,6 @@ impl TypeTermEditor {
/* replace with new list-node (ladder/app) with self as first element
*/
pub(super) fn morph_to_list(&mut self, state: State) {
eprintln!("morph into ladder");
let mut old_node = self.cur_node.get().clone();

View file

@ -323,7 +323,6 @@ impl Context {
node.clone()
}
} else {
eprintln!("could not find morphism {}", pattern.to_str(&node.ctx.read().unwrap()));
node
}
}