remove debug prints
This commit is contained in:
parent
d15077aca0
commit
39fbae7740
7 changed files with 0 additions and 21 deletions
|
@ -43,7 +43,6 @@ impl ObjCommander for DigitEditor {
|
||||||
self.msg.clear();
|
self.msg.clear();
|
||||||
|
|
||||||
if self.ctx.read().unwrap().meta_chars.contains(&c) {
|
if self.ctx.read().unwrap().meta_chars.contains(&c) {
|
||||||
eprintln!("digitedit: meta char");
|
|
||||||
return TreeNavResult::Exit;
|
return TreeNavResult::Exit;
|
||||||
|
|
||||||
} else if c.to_digit(self.radix).is_none() {
|
} else if c.to_digit(self.radix).is_none() {
|
||||||
|
|
|
@ -57,7 +57,6 @@ impl ObjCommander for ListEditor {
|
||||||
}
|
}
|
||||||
|
|
||||||
else if let Some(cmd) = cmd_repr.get_view::<dyn SingletonView<Item = ListCmd>>() {
|
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();
|
let cur = self.cursor.get();
|
||||||
drop(cmd_repr);
|
drop(cmd_repr);
|
||||||
|
@ -76,7 +75,6 @@ impl ObjCommander for ListEditor {
|
||||||
|
|
||||||
match cmd.get() {
|
match cmd.get() {
|
||||||
ListCmd::DeletePxev => {
|
ListCmd::DeletePxev => {
|
||||||
eprintln!("SELECT: delete pxev");
|
|
||||||
if idx > 0
|
if idx > 0
|
||||||
&& item_cur.tree_addr.iter().fold(
|
&& item_cur.tree_addr.iter().fold(
|
||||||
true,
|
true,
|
||||||
|
@ -118,7 +116,6 @@ impl ObjCommander for ListEditor {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
eprintln!("ptylist: no item");
|
|
||||||
TreeNavResult::Exit
|
TreeNavResult::Exit
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -126,7 +123,6 @@ impl ObjCommander for ListEditor {
|
||||||
ListCursorMode::Insert => {
|
ListCursorMode::Insert => {
|
||||||
match cmd.get() {
|
match cmd.get() {
|
||||||
ListCmd::DeletePxev => {
|
ListCmd::DeletePxev => {
|
||||||
eprintln!("INSERT: delete pxev");
|
|
||||||
self.delete_pxev();
|
self.delete_pxev();
|
||||||
TreeNavResult::Continue
|
TreeNavResult::Continue
|
||||||
}
|
}
|
||||||
|
@ -149,7 +145,6 @@ impl ObjCommander for ListEditor {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
eprintln!("ptylist: cursor has no idx");
|
|
||||||
TreeNavResult::Exit
|
TreeNavResult::Exit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,6 @@ impl ListEditor {
|
||||||
if idx >= 0 && idx < data.len() as isize {
|
if idx >= 0 && idx < data.len() as isize {
|
||||||
data.get(idx as usize).read().unwrap().get_mode_view()
|
data.get(idx as usize).read().unwrap().get_mode_view()
|
||||||
} else {
|
} else {
|
||||||
eprintln!("ListEditor::mode_port invalid cursor idx");
|
|
||||||
ip
|
ip
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -242,7 +241,6 @@ impl ListEditor {
|
||||||
if self.is_listlist() {
|
if self.is_listlist() {
|
||||||
cur.mode = ListCursorMode::Select;
|
cur.mode = ListCursorMode::Select;
|
||||||
} else {
|
} else {
|
||||||
eprintln!("list insert: is not a listlist ({:?})", self.typ);
|
|
||||||
item.write().unwrap().goto(TreeCursor::none());
|
item.write().unwrap().goto(TreeCursor::none());
|
||||||
cur.idx = Some(idx + 1);
|
cur.idx = Some(idx + 1);
|
||||||
}
|
}
|
||||||
|
@ -258,13 +256,11 @@ impl ListEditor {
|
||||||
|
|
||||||
self.cursor.set(cur);
|
self.cursor.set(cur);
|
||||||
} else {
|
} else {
|
||||||
//eprintln!("insert: no cursor");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// split the list off at the current cursor position and return the second half
|
/// split the list off at the current cursor position and return the second half
|
||||||
pub fn split(&mut self) {
|
pub fn split(&mut self) {
|
||||||
eprintln!("split");
|
|
||||||
let cur = self.cursor.get();
|
let cur = self.cursor.get();
|
||||||
if let Some(idx) = cur.idx {
|
if let Some(idx) = cur.idx {
|
||||||
let idx = idx as usize;
|
let idx = idx as usize;
|
||||||
|
@ -299,7 +295,6 @@ impl ListEditor {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn listlist_split(&mut self) {
|
pub fn listlist_split(&mut self) {
|
||||||
eprintln!("listlist split");
|
|
||||||
let cur = self.get_cursor();
|
let cur = self.get_cursor();
|
||||||
|
|
||||||
if let Some(mut item) = self.get_item().clone() {
|
if let Some(mut item) = self.get_item().clone() {
|
||||||
|
@ -316,7 +311,6 @@ impl ListEditor {
|
||||||
tail_node.goto(TreeCursor::home());
|
tail_node.goto(TreeCursor::home());
|
||||||
|
|
||||||
for node in b.iter() {
|
for node in b.iter() {
|
||||||
eprintln!("splid :send to tail node");
|
|
||||||
tail_node
|
tail_node
|
||||||
.send_cmd_obj(
|
.send_cmd_obj(
|
||||||
ReprTree::new_leaf(
|
ReprTree::new_leaf(
|
||||||
|
|
|
@ -195,7 +195,6 @@ impl TreeNav for ListEditor {
|
||||||
TreeNavResult::Exit
|
TreeNavResult::Exit
|
||||||
} else if direction.y > 0 {
|
} else if direction.y > 0 {
|
||||||
// dn
|
// dn
|
||||||
eprintln!("dn: data.len() = {}", self.data.len());
|
|
||||||
self.cursor.set(ListCursor {
|
self.cursor.set(ListCursor {
|
||||||
mode: if self.data.len() > 0 { cur.leaf_mode } else { ListCursorMode::Insert },
|
mode: if self.data.len() > 0 { cur.leaf_mode } else { ListCursorMode::Insert },
|
||||||
idx: Some(0)
|
idx: Some(0)
|
||||||
|
@ -367,7 +366,6 @@ impl TreeNav for ListEditor {
|
||||||
depth as isize - 1
|
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 );
|
new_addr.push( cur.tree_addr[0] - 1 );
|
||||||
for _i in 0..n_steps_down {
|
for _i in 0..n_steps_down {
|
||||||
new_addr.push( -1 );
|
new_addr.push( -1 );
|
||||||
|
@ -387,7 +385,6 @@ impl TreeNav for ListEditor {
|
||||||
depth as isize - 1
|
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 );
|
new_addr.push( cur.tree_addr[0] + 1 );
|
||||||
for _i in 0..n_steps_down {
|
for _i in 0..n_steps_down {
|
||||||
new_addr.push( 0 );
|
new_addr.push( 0 );
|
||||||
|
@ -396,7 +393,6 @@ impl TreeNav for ListEditor {
|
||||||
|
|
||||||
drop(cur_item);
|
drop(cur_item);
|
||||||
|
|
||||||
eprintln!("CROSS: goto {:?}", new_addr);
|
|
||||||
cur.tree_addr = new_addr;
|
cur.tree_addr = new_addr;
|
||||||
self.goto(cur)
|
self.goto(cur)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -240,7 +240,6 @@ impl ObjCommander for TypeTermEditor {
|
||||||
self.set_state( State::Ladder );
|
self.set_state( State::Ladder );
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
eprintln!("ERROR");
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
self.set_state( State::AnySymbol );
|
self.set_state( State::AnySymbol );
|
||||||
|
|
|
@ -285,7 +285,6 @@ impl TypeTermEditor {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn normalize_empty(&mut self) {
|
pub fn normalize_empty(&mut self) {
|
||||||
eprintln!("normalize singleton");
|
|
||||||
let subladder_list_node = self.cur_node.get().clone();
|
let subladder_list_node = self.cur_node.get().clone();
|
||||||
let subladder_list_edit = subladder_list_node.get_edit::<ListEditor>().unwrap();
|
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
|
/* unwrap a ladder if it only contains one element
|
||||||
*/
|
*/
|
||||||
pub fn normalize_singleton(&mut self) {
|
pub fn normalize_singleton(&mut self) {
|
||||||
eprintln!("normalize singleton");
|
|
||||||
|
|
||||||
if self.state == State::Ladder {
|
if self.state == State::Ladder {
|
||||||
let subladder_list_node = self.cur_node.get().clone();
|
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
|
/* replace with new list-node (ladder/app) with self as first element
|
||||||
*/
|
*/
|
||||||
pub(super) fn morph_to_list(&mut self, state: State) {
|
pub(super) fn morph_to_list(&mut self, state: State) {
|
||||||
eprintln!("morph into ladder");
|
|
||||||
|
|
||||||
let mut old_node = self.cur_node.get().clone();
|
let mut old_node = self.cur_node.get().clone();
|
||||||
|
|
||||||
|
|
|
@ -323,7 +323,6 @@ impl Context {
|
||||||
node.clone()
|
node.clone()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
eprintln!("could not find morphism {}", pattern.to_str(&node.ctx.read().unwrap()));
|
|
||||||
node
|
node
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue