support line and column in command line parameters

This commit is contained in:
Maxime Coste 2012-08-07 14:00:47 +02:00
parent b3c293a9da
commit 718f62b6a3

View File

@ -500,7 +500,12 @@ int main(int argc, char* argv[])
write_debug("utf-8 test: é á ï"); write_debug("utf-8 test: é á ï");
if (argc > 1) if (argc > 1)
command_manager.execute(String("edit ") + argv[1], context); {
String cmd = "edit ";
for (int i = 1; i < argc; ++i)
cmd += String(" ") + argv[i];
command_manager.execute(cmd, context);
}
else else
{ {
auto buffer = new Buffer("*scratch*", Buffer::Type::Scratch); auto buffer = new Buffer("*scratch*", Buffer::Type::Scratch);