Skip to content

Commit

Permalink
Merge pull request #11 from TheQuinbox/master
Browse files Browse the repository at this point in the history
Use new configuration values for telling if indentation reporting is turned on. Closes #10.
  • Loading branch information
mltony authored Dec 10, 2022
2 parents 9eefa5c + d65a004 commit 72e3124
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions addon/globalPlugins/indent_nav.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
import api
import controlTypes
import config
try:
from config.configFlags import ReportLineIndentation
except (ImportError, ModuleNotFoundError):
pass
import core
import ctypes
from enum import Enum, auto
Expand All @@ -37,6 +41,7 @@
import time
import tones
import ui
import versionInfo
import wx

try:
Expand All @@ -46,6 +51,8 @@
ROLE_EDITABLETEXT = controlTypes.Role.EDITABLETEXT
ROLE_TREEVIEWITEM = controlTypes.Role.TREEVIEWITEM

BUILD_YEAR = getattr(versionInfo, "version_year", 2023)

debug = False
if debug:
import threading
Expand Down Expand Up @@ -420,6 +427,8 @@ def getIndentLevel(self, s):
return len(indent.replace("\t", " " * 4))

def isReportIndentWithTones(self):
if BUILD_YEAR >= 2023:
return config.conf["documentFormatting"]["reportLineIndentation"] >= ReportLineIndentation.TONES
return config.conf["documentFormatting"]["reportLineIndentationWithTones"]

def crackle(self, levels):
Expand Down

0 comments on commit 72e3124

Please sign in to comment.