private string GetFirstLetterOfLastFlag() { int currentArgumentIndex = ArgumentHelper.GetArgumentIndexAtOffset(Document, CaretOffset); if (currentArgumentIndex == -1 || currentArgumentIndex == 0) { return(null); } string prevArgument = ArgumentHelper.GetArgumentFromIndex(Document, CaretOffset, currentArgumentIndex - 1).Trim(); if (!prevArgument.Contains("_")) { return(null); } if (prevArgument.Contains("=")) { prevArgument.Split('=').Last().Trim(); } return(prevArgument[0].ToString()); }