245 @return raw character at the requested position or empty bytes, if the |
245 @return raw character at the requested position or empty bytes, if the |
246 position is negative or past the end of the document (bytes) |
246 position is negative or past the end of the document (bytes) |
247 """ |
247 """ |
248 char = self.SendScintilla(QsciScintilla.SCI_GETCHARAT, pos) |
248 char = self.SendScintilla(QsciScintilla.SCI_GETCHARAT, pos) |
249 if char == 0: |
249 if char == 0: |
250 return b"" |
250 return bytearray() |
251 if char < 0: |
251 if char < 0: |
252 char += 256 |
252 char += 256 |
253 return bytes.fromhex("{0:02x}".format(char)) |
253 return bytearray((char,)) |
254 |
254 |
255 def foldLevelAt(self, line): |
255 def foldLevelAt(self, line): |
256 """ |
256 """ |
257 Public method to get the fold level of a line of the document. |
257 Public method to get the fold level of a line of the document. |
258 |
258 |