forked from solderpunk/AV-98
themes are now applied instantly
This commit is contained in:
parent
2fa2fbc718
commit
1a2cff83af
|
@ -318,7 +318,7 @@ class GeminiClient(cmd.Cmd):
|
|||
params["validity"] = 60
|
||||
# Use cache or mark as to_fetch if resource is not cached
|
||||
if handle and not self.sync_only:
|
||||
displayed = self.opencache.opnk(url,mode=mode,grep=grep,**params)
|
||||
displayed = self.opencache.opnk(url,mode=mode,grep=grep,theme=self.theme,**params)
|
||||
modedurl = mode_url(url,mode)
|
||||
if not displayed:
|
||||
#if we can’t display, we mark to sync what is not local
|
||||
|
|
4
opnk.py
4
opnk.py
|
@ -177,7 +177,7 @@ class opencache():
|
|||
else:
|
||||
return None
|
||||
|
||||
def opnk(self,inpath,mode=None,terminal=True,grep=None,**kwargs):
|
||||
def opnk(self,inpath,mode=None,terminal=True,grep=None,theme=None,**kwargs):
|
||||
#Return True if inpath opened in Terminal
|
||||
# False otherwise
|
||||
#if terminal = False, we don’t try to open in the terminal,
|
||||
|
@ -196,7 +196,7 @@ class opencache():
|
|||
else:
|
||||
print("%s does not exist"%inpath)
|
||||
return
|
||||
renderer = self.get_renderer(inpath,mode=mode)
|
||||
renderer = self.get_renderer(inpath,mode=mode,theme=theme)
|
||||
if renderer and mode:
|
||||
renderer.set_mode(mode)
|
||||
self.last_mode[inpath] = mode
|
||||
|
|
Loading…
Reference in New Issue