summaryrefslogtreecommitdiff
path: root/fluid/Fl_Function_Type.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <git@matthiasm.com>2021-12-15 19:29:12 +0100
committerMatthias Melcher <github@matthiasm.com>2021-12-15 19:38:09 +0100
commit7161cad2c75c323fe8c9316ab7ac14e84411b37f (patch)
tree747a1ec72f30e00d9b5999bb5a32f6bbcb16897d /fluid/Fl_Function_Type.cxx
parentf57b074378d69d19eb5a70e6335054bada06919a (diff)
#329 #318: Fixed Fluid indenting and trailing whitespace
Diffstat (limited to 'fluid/Fl_Function_Type.cxx')
-rw-r--r--fluid/Fl_Function_Type.cxx19
1 files changed, 1 insertions, 18 deletions
diff --git a/fluid/Fl_Function_Type.cxx b/fluid/Fl_Function_Type.cxx
index ac367c7b9..ab3672e23 100644
--- a/fluid/Fl_Function_Type.cxx
+++ b/fluid/Fl_Function_Type.cxx
@@ -634,24 +634,7 @@ void Fl_Code_Type::write_code1() {
main_window->redraw(); // tell fluid to redraw; edits may affect tree's contents
}
- const char* c = name();
- if (!c) return;
-
- const char *pch;
- const char *ind = indent();
- while( (pch=strchr(c,'\n')) )
- {
- int line_len = int(pch - c);
- if (line_len < 1)
- write_c("\n");
- else
- write_c("%s%.*s\n", ind, line_len, c);
- c = pch+1;
- }
- if (*c)
- write_c("%s%s\n", ind, c);
- else
- write_c("\n");
+ write_c_indented(name(), 0, '\n');
}
/**