[Geany-devel] Proposed patch to fix issues with command line file loading

Dimitar Zhekov dimitar.zhekov at xxxxx
Sat Jan 29 12:17:08 UTC 2011


Here is a sample load_startup_files() pseudocode that will hopefully:

1. Fix the CL project loading if prefs.load_session is false.
2. Open the default session files based on prefs.load_session even if
command line files are passed.
3. Always open the command line files.
4. Make the startup simpler.

local load_session = false

if (arg1 ends with  ".geany")
      main_load_project_from_command_line(arg1, false)
      skip arg1
      load_session = cl_options.load_session
else if (cl_options.load_session && prefs.load_session && !new_instance)
      // filename(s) -> default session, not last project
      if (args <= 1)
      load_session = true

if (load_session)


This is the variant Colombian and I prefer, with no preference to avoid
loading the default session if command line files are specified and
prefs.load_session is true. For the command line, using -s and -i can be
used to do that.

E-gards: Jimmy

More information about the Devel mailing list