From 972eb66638b33c21c45e58581458d7cad55678f6 Mon Sep 17 00:00:00 2001 From: Jonathan Wilkes <jon.w.wilkes@gmail.com> Date: Sun, 12 Mar 2017 14:09:05 -0400 Subject: [PATCH] fix #280: duplicate messages aren't printed after clearing the console --- pd/nw/pdgui.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pd/nw/pdgui.js b/pd/nw/pdgui.js index f366d1321..cfc58128f 100644 --- a/pd/nw/pdgui.js +++ b/pd/nw/pdgui.js @@ -501,13 +501,16 @@ var duplicate = 0; function do_post(string, type) { var myp, span, text, printout; current_string += string; + myp = pd_window.document.getElementById("p1"); if (string.slice(-1) === "\n") { if (current_string === last_string) { last_child.textContent = "[" + (duplicate + 2) + "] " + last_string; duplicate++; current_string = ""; + if (myp.lastChild !== last_child) { + myp.appendChild(last_child); + } } else { - myp = pd_window.document.getElementById("p1"), span = pd_window.document.createElement("span"); if (type) { span.classList.add(type); @@ -4475,6 +4478,10 @@ function gui_dropdown_activate(cid, obj_tag, tag, current_index, font_size, stat .window.document.querySelector("#dropdown_list"); // stick the obj_tag in a data field select_elem.setAttribute("data-callback", obj_tag); + select_elem.style.setProperty("max-height", + (patchwin[cid].window.innerHeight - + g.getBoundingClientRect().bottom - 5) + "px" + ); select_elem.style.setProperty("display", "inline"); select_elem.style.setProperty("left", (elem_get_coords(g).x - svg_view.x) + "px"); -- GitLab