mirror of
				https://github.com/SquidDev-CC/CC-Tweaked
				synced 2025-10-30 21:23:00 +00:00 
			
		
		
		
	Removed term.getLine
This commit is contained in:
		| @@ -67,7 +67,6 @@ public class TermAPI implements ILuaAPI | |||||||
|             "nativePaletteColour", |             "nativePaletteColour", | ||||||
|             "nativePaletteColor", |             "nativePaletteColor", | ||||||
|             "getCursorBlink", |             "getCursorBlink", | ||||||
|             "getLine", |  | ||||||
|         }; |         }; | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @@ -280,21 +279,6 @@ public class TermAPI implements ILuaAPI | |||||||
|             case 25: |             case 25: | ||||||
|                 // getCursorBlink |                 // getCursorBlink | ||||||
|                 return new Object[] { m_terminal.getCursorBlink() }; |                 return new Object[] { m_terminal.getCursorBlink() }; | ||||||
|             case 26: |  | ||||||
|                 // getLine |  | ||||||
|                 int y = getInt( args, 0 ) - 1; |  | ||||||
|                 if ( y < 0 || y >= m_terminal.getHeight() ) |  | ||||||
|                 { |  | ||||||
|                     throw new LuaException( "Line is out of range." ); |  | ||||||
|                 } |  | ||||||
|                 String line, lineTextColour, lineBackgroundColour; |  | ||||||
|                 synchronized ( m_terminal ) |  | ||||||
|                 { |  | ||||||
|                     line = m_terminal.getLine( y ).read(); |  | ||||||
|                     lineTextColour = m_terminal.getTextColourLine( y ).read(); |  | ||||||
|                     lineBackgroundColour = m_terminal.getBackgroundColourLine( y ).read(); |  | ||||||
|                 } |  | ||||||
|                 return new Object[] { line, lineTextColour, lineBackgroundColour }; |  | ||||||
|             default: |             default: | ||||||
|                 return null; |                 return null; | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -9,13 +9,4 @@ describe("The term library", function() | |||||||
|                   :eq("term is not a recommended redirect target, try term.current() instead") |                   :eq("term is not a recommended redirect target, try term.current() instead") | ||||||
|         end) |         end) | ||||||
|     end) |     end) | ||||||
|  |  | ||||||
|     describe("term.getLine", function() |  | ||||||
|         it("validates arguments", function() |  | ||||||
|             local _, y = term.getSize() |  | ||||||
|             expect.error(term.getLine, nil):eq("bad argument #1 (expected number, got nil)") |  | ||||||
|             expect.error(term.getLine, 0):eq("Line is out of range.") |  | ||||||
|             expect.error(term.getLine, y + 1):eq("Line is out of range.") |  | ||||||
|         end) |  | ||||||
|     end) |  | ||||||
| end) | end) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 liquid
					liquid