Changeset 005eae5


Ignore:
Timestamp:
Sep 18, 2010, 5:07:39 PM (11 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.7, release-1.8, release-1.9
Children:
818f19c
Parents:
a8186dc
git-author:
David Benjamin <davidben@mit.edu> (08/01/10 16:55:05)
git-committer:
David Benjamin <davidben@mit.edu> (09/18/10 17:07:39)
Message:
Make owl_global_get_typwin return the context's typwin

The only remaining callers are the perl glue and some functions in
keys.c. This makes that allo of that code independent of a global
editwin.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • global.c

    r9eb38bb r005eae5  
    151151}
    152152
    153 owl_context *owl_global_get_context(owl_global *g) {
     153owl_context *owl_global_get_context(const owl_global *g) {
    154154  if (!g->context_stack)
    155155    return NULL;
     
    283283/* typwin */
    284284
     285/* Gets the currently active typwin out of the current context. */
    285286owl_editwin *owl_global_get_typwin(const owl_global *g) {
    286   return(g->tw);
     287  owl_context *ctx = owl_global_get_context(g);
     288  /* Get the current editwin from the context. */
     289  if (ctx && owl_context_matches(ctx, OWL_CTX_TYPWIN)) {
     290    return owl_context_get_data(ctx);
     291  }
     292  return NULL;
    287293}
    288294
Note: See TracChangeset for help on using the changeset viewer.